xgameruntime: export missing GDK APIs from xgameruntime.dll #1211
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1220"
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 Ivankiosan on 2026-11-24T13:21:18Z.
Exports missing GDK functions from
xgameruntime.dllincrates/xcl/src/hle/xgameruntime/mod.rsthat were previously internal toapi.rsor unexported, ensuring titles and libraries querying these symbols directly viaGetProcAddressor static import resolve them properly.What is in it
XSystemGetAppSpecificDeviceIdwith GDK buffer validation (minimum 45 bytes, returnsE_NOT_SUFFICIENT_BUFFERwhen undersized,E_INVALIDARGon null buffer, and populates 44 uppercase alphanumeric characters + NUL terminator).XUserCheckPrivilegewith user validation against local user handle and null check on thehasoutput parameter.XGameGetXboxTitleId,XGameSaveFilesGetRemainingQuota,XPackageGetPackageKind,XPackageGetUserLocale,XPackageGetWriteStats,XPackageFindChunkAvailability,XPackageEstimateDownloadSize,XPackageCreateInstallationMonitor,XPackageGetInstallationProgress,XPackageRegisterInstallationProgressChanged,XPackageUnregisterInstallationProgressChanged,XLaunchNewGame, andXLaunchRestartOnCrash.api.rsandmod.rs.crates/xcl/src/hle/xgameruntime/mod.rsverifying all runtime exports are present inexports(), buffer size validation forXSystemGetAppSpecificDeviceId, and user/pointer validation forXUserCheckPrivilege.Tested
rustc 1.99.1 (58cf8f9c3 2026-10-13)/ MSVC 14.51.cargo test -p xcl --lib hle::xgameruntime: all 76 unit tests passed.cargo test --workspace -- --test-threads=4: 722 unit tests passed, all integration tests passed, 0 failures.target/release/xcl.exe(cargo build --release -p xcl).Regression run
main:
PR head:
Not tested
AI use
xgameruntime.dllagainstapi.rsvtables and GDK specifications, implemented export symbols and validation logic, wrote unit tests, and verified full workspace tests and smoke regression run.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:47:20Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:Note: the full
d3d12xlib filter currently aborts with 0xc0000005 on unmodifiedmaintoo (pre-existing, unrelated to this PR); the PR's own tests were run by name and pass.mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #172Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T04:05:31Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:40:06Z.
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-01T05:09:46Z.
Triage (#1607) – head
3e079cdNo open or merged PR makes the same change: on main these functions are still private in hle/xgameruntime/api.rs and reachable only through the QueryApiImpl tables, not exported by name from
exports().Two behaviour changes beyond adding exports that the description should state:
XSystemGetAppSpecificDeviceId(moved to mod.rs) now returns a 44-hex-char id instead of main's 16-char one, also through the QueryApiImpl slot path, so a title that stored the old id sees a different one; andXUserCheckPrivilegenow returns E_INVALIDARG for any handlevalid_userdoes not know (main ignored the handle).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.