XGameRuntime: one reading of the title id for both APIs and the start-up line #1841
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1851"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by us3r40456 on 2026-11-24T21:48:45Z.
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+ #750 + #1329 + #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
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T01:28:43Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:01:15Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:59:20Z.
Triage (#1607) – head
40df48bNo open or merged PR makes this change. On main,
XGameGetXboxTitleIdandenumerate_packagesinapi.rsstill each readtitle_idtheir own way (trim_start_matches("0x")), so the sharedparse_title_idis not on main. No problems found in the diff. The failing check is the PR description check, and the branch conflicts with main.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.