feat(xgameruntime): implement XSystemGetDeviceType and XPackageIsPackagedProcess #9
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!9
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/9/head"
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?
@CaseReed on GitHub · 2026-11-21 05:41 UTC · original
CaseReed:feat/xsystem-device-type→main· +126 −22 · 20 files · 3 commits · merged 2026-11-21 06:59 UTCWhat
Implements
XSystemGetDeviceTypeandXPackageIsPackagedProcess(#2). The ticket asks to decide what a desktop host should report; this is the choice and why.XSystemGetDeviceTypereports the console mode the title declares, not the host hardware. The public reference says the function returns the console mode rather than the actual hardware, and that an Xbox One title does not get a Series code. Console code typically switches on the value to pick a render resolution and has noPccase, so reportingPcto every title would send console builds down their default branch. The title already states its target inMicrosoftGame.config:TargetDeviceFamilyof the first<Executable>ScarlettXboxScarlettAnacondaXboxOne, or an<Executable>without the attribute (the packaging default)XboxOneXPCPcAbxUnsupported<Executable>, or no readableMicrosoftGame.configAbxUnsupported, asXGameGetXboxTitleIddoes for a missing<TitleId>Reporting the top model of each family whatever the host is an assumption; it is recorded in debt with a
Closes when:. If you would rather reportPc, the lower models, or make it configurable, I'm happy to change it.XPackageIsPackagedProcessreturnsfalse. A relinked title started from a folder has no package identity on the host. Recorded in debt.Supporting changes:
TargetDeviceFamilyinTitleConfigand exposes it throughAbxTitleDeviceFamily(), shaped likeAbxTitleName().XSystemDeviceTypeis added toTypes.hppwith the values from the public reference. The two functions live in newSystem.cppandPackage.cpp.e2e_device_*scenarios cover each row of the table, including an<Executable>without the attribute, a config without<Executable>and no config. The stand-in console DLL returns deliberately wrong values (0xffffffff,true), so the scenarios fail if the call is not routed to AnyBox.docs/dev/debt/changes/gdk-inventory.md(a pending fragment already onmain) namedTaskQueue.cppandRuntime.cppas the only files with implemented exports; I added the two new files to that sentence so it stays true. A second fragment cannot change the same entry, so the edit is in place.The debt fragment is named
feat-xsystem-device-type.md:debt_fold.pyreadschanges/*.mdonly, so a file underchanges/feat/would not be found.Self-review (second commit). An independent read of the first commit found that the
XboxOnedefault also applied to a config the reader could not parse, that returningUnknownfor a missing config did not follow "implement or stop", and thate2e_device_defaultdid not test what it claimed. The second commit fixes the three. It also records in debt that the config reader does not skip XML comments (already true for<TitleId>,<Identity>and<ShellVisuals>); I left the reader itself alone to keep this PR on one topic and can send a separate fix.Tested
Windows 11, MSVC 19.38 (VS 2022), CMake 4.4.4, Ninja 1.13.2, clean build directory, on top of #8.
ctest: 29/29 (22 existing, 7 new).python tools/check_conventions.py: ok.python tools/debt_fold.py --check: 2 fragments apply cleanly.python tools/progress.py --module xgameruntime: 13 → 15 implemented, 378 → 376 stubs.Not tested: the MinGW build (no GCC on this machine; relies on CI), MSVC 19.51, the run report schema check (
jsonschemanot installed), and behaviour against a console title.Checklist
main; no other open PR implements the same functions (based onmainplus #8, see Depends on)python tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.mdmain)🤖 Generated with Claude Code
@Dark3581 on GitHub · 2026-11-21 06:59 UTC · original · approved these changes
Reviewed — looks good
Nothing blocks this change. Both functions match the public reference, and every row of the device table has an end-to-end test.
What I ran
Reviewed head
e3ebe0d. Built it with MinGW (WinLibs GCC 15.2 UCRT, Ninja, Release) on Windows 10 from a clean build directory, and checked that it merges ontomainafter #8 with a tree identical to the tested head.Results
e2e_device_*scenariostools/check_conventions.pytools/debt_fold.py --checktools/progress.py --module xgameruntimeFindings
Blocking
None.
Non-blocking
<Executable>would misreport one build in a package that lists both an Xbox One and a Series executable. The Executable element reference rules that out for packages: "MakePkg.exe requires all executables in the MicrosoftGame.config use the same TargetDeviceFamily specification". A loose-file layout could still mix them. Matching the entry whoseNameis the running executable would cover that, if it ever matters.Sources
The default for a missing attribute matches the same page: "Packaging will default to the XboxOne TargetDeviceFamily if no Executable has the TargetDevieFamily attribute defined when running MakePkg pack for XBOX consoles."
Not verified
Behaviour against a console title, and how titles react to the lower models of each family (recorded in debt with
Closes when:).To get this to a good state
Nothing is required. Reporting the top model of each family is a fair default; let's keep it.