Repository navigation
Conversation
…-up line XGameGetXboxTitleId parsed title_id as hex after stripping a lowercase "0x" and gave 0 for anything else, while XPackageEnumeratePackages handed the title the raw text, upper-cased. A malformed id therefore reached the title as 0 from one API and as text from the other, the start-up line showed it as if it were taken, and the warning said there was no TitleId. config::parse_title_id is now the one reading: hex, "0x" or "0X", spaces around ignored; empty, not hex, wider than 32 bits or 0 is no title id. XGameGetXboxTitleId and XPackageEnumeratePackages (8 hex digits, or none) both use it, the start-up line marks an id that is not one, and the warning names the value it could not read. Test: a_title_id_is_read_one_way.
Contributor
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
XCL gives a title its title id through two XGameRuntime functions, and they read
title_idin two ways.XGameGetXboxTitleIdparses it as hex after stripping a lowercase0x, and gives 0 for anything else.XPackageEnumeratePackageshands over the raw text, upper-cased. So a malformed id reaches the title as 0 from one and as text from the other (XYZ123→ 0 and"XYZ123"). The start-up line also prints the manifest's value as if it were taken, and the warning says "no TitleId" when there is one it cannot read. This PR gives both functions and the start-up line one reading.What is in it
config::parse_title_id: hex, with or without0x/0X, spaces around it ignored. Empty, not hex (a+sign included), wider than 32 bits or 0 is no title id.Config::title_id_valueapplies it totitle_id.XGameGetXboxTitleIduses it. The warning stays "no TitleId …" when there is none, and names the value when there is one it cannot read (TitleId "XYZ123" (MicrosoftGame.Config / xcl.toml) is not a nonzero 32-bit hex title id → 0).XPackageEnumeratePackages'stitle_idis that number as 8 hex digits, or empty whereXGameGetXboxTitleIdgives 0.TitleId "XYZ123" (not a nonzero 32-bit hex title id: the title gets none).a_title_id_is_read_one_way: the parser on 12 inputs, the start-up line for a good and a bad id, and that xcl.toml's id wins over the manifest's.XSystemGetAppSpecificDeviceIdhash (api.rs:1265) still uses thetitle_idtext, so the id it gives a title does not change for anyone.Tested
main1d027e5:config::8 passed,hle::xgameruntime::73 passed, 0 failed.QueryApiImpl,XGameslot 3 andXPackageslot 39), with 13 variants (12 before the change) of itsMicrosoftGame.config<TitleId>and oftitle_idinxcl.toml. Each variant was run before the change, on the Mac test stack (main7f7e768+ D3D12.X: a stage the PC cannot run goes to the fallback without the driver #750 + D3D12.X: the committed window gets a copy in video memory #1329 + DirectStorage: EnqueueSignal takes a fence in memory VirtualQuery does not know #1813 +pr/native-host-vtables, which takes the title to its end on a Mac), and after it, onmain1d027e5+ this PR. Three of them (XYZ123,0X1234ABCD,1234ABCD) were also run on plainmain1d027e5, with the same values as on the stack:<TitleId>/ xcl.tomlmain: slot 3 / slot 39""""1234ABCD,0x1234abcd, with spaces and line breaks0x1234abcd/"1234ABCD"0X1234ABCD"0X1234ABCD"0x1234abcd/"1234ABCD"XYZ123"XYZ123"""123456789"123456789"""""""00000000"00000000"""ABCD0x0000abcd/"ABCD"(read from the code, not run)0x0000abcd/"0000ABCD"CAFE0001(manifest1234ABCD)0xcafe0001/"CAFE0001"pasunid"PASUNID"""The title id changes nothing else in the test title: on the stack every variant ends with the same 47 PASS / 3 FAIL, and on plain
mainwith and without this PR every variant gets 31 PASS / 1 FAIL before plainmain's known D3DMetal crash (#258), which comes after the probe. The probe is not part of this PR.Regression run
This changes
crates/xcl/src, so it needsxcl-smokepairs. I have no title. A title with a valid hex<TitleId>gets the same values as before, except thatXPackageEnumeratePackagesnow always writes 8 digits (ABCD→0000ABCD). Draft until the pairs are here.main:
PR:
Not tested
XPackageDetails::titleId. I chose 8 digits, the way the console writes title ids. I have no title to check against.config::andhle::xgameruntime::.AI use