feat: offline GDK interfaces (XGameStreaming, XGameUi, XNetworking, XAccessibility, XUser), unnotified subscriptions in E_NOTIMPL — 277/396 #231
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/231"
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 LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-25T19:49:05Z.
Supersedes #217 (closed by the maintainer for conflicts; rebased onto main
4f2cf5cas asked)Only the README rows next to the RDNA 2 lines conflicted (main's RDNA 2 numbers kept, this PR's GDK lines kept). The last commit of #217 (README test count
1200+) is already onmain, so the rebase dropped it; the suite collects 1,355 tests (1300+, already onmain).Change
New version of #156, as asked in the maintainer's closing note (https://github.com/LooperSalty/AnyXboxX/pull/156#issuecomment-7166165861): the offline GDK interfaces come back unchanged, and the change subscriptions that AnyXboxX never notifies now return
E_NOTIMPLand are logged, instead ofS_OKwith a token.Linked issue: Refs #156
main(nowa445308), their messages translated into English (rule 7):XGameStreamingwith no streaming client,XGameUihanded to the game's own UI callbacks, the PC's network settings and high-contrast mode (XNetworking,XAccessibility),XUserdevices (Windows' default communications audio endpoint, the all-zero controller id documented for PC).docs: cite the Microsoft Learn pages for the PC answers of the XNetworking queries, comment only) gives the source of the zero answers next to the code. XNetworkingConfigurationSetting says for each of the three settings: "Retrieving this setting on PC will always report the value 0". XNetworkingStatisticsType says for each of the three types: "On PC, all statistics in the structure are always reported as 0". Both functions returnS_OKwith these documented values, and an unknown setting or type returnsE_INVALIDARG, as the function pages say.fix: change subscriptions that are never notified return E_NOTIMPL) is the rule 3 fix.XNetworkingRegisterConnectivityHintChangedandXUserRegisterForDefaultAudioEndpointUtf16Changedare wired toANYXBOXX_NOT_IMPLEMENTED:E_NOTIMPL, the trace line[runtime] méthode d'interface non écrite appelée -> E_NOTIMPLwithANYXBOXX_TRACE=1, no token written. Their unregister functions returnfalse(no registration can succeed). The queries (XNetworkingGetConnectivityHint,XUserGetDefaultAudioEndpointUtf16) still return the current value.XUserRegisterForDeviceAssociationChangedhad the same pattern (S_OK, token, callback never called; it was in the first review of #156 next to the audio endpoint), so it returnsE_NOTIMPLtoo. If you prefer it left as it was, it is one table line inuser_device_interface.cppand one test parameter to revert.fix: XGameStreamingRegisterConnectionStateChanged returns E_NOTIMPL), from the review: no streaming client ever connects, so this registration's callback could never run. Slot 12 is nowANYXBOXX_NOT_IMPLEMENTEDin the C++ table and left tonot_implementedin the Rust one (E_NOTIMPL, logged withANYXBOXX_TRACE=1, no token written);XGameStreamingUnregisterConnectionStateChangedreturnsfalsein both.XGameStreamingGetConnectionStatestill answersDisconnected.ANYXBOXX_NOT_IMPLEMENTEDin the tables, the GDK runtime counter drops from 280 to 276 of 396 (README in English and French, GDK parts ofcarte-avancee.svgandtraduction.svg).docs/progress.mdanddocs/fr/avancee.md: the "Subscriptions" section lists the four, saysE_NOTIMPL+ log and cites the decision on #156.main, not part of this PR):XStoreRegisterGameLicenseChanged(the offline license never changes).carte-avancee.svgandtraduction.svgare re-rendered (they depend onruntime/xgameruntimealone); the sections that need the game package stay as onmain.Verification
Windows 11 26200, Python 3.12, runtime built from this branch (VS 2022 Build Tools, CMake, cargo with the CI flags), rebased on
mainata445308:README test count (
1900+) = collected tests rounded down (1992); GDK counter in the README =translation.gdk_runtime_area()(276).Oracle and test data
E_NOTIMPLand leave the caller's token untouched, the unregisters returnfalse; a subprocess withANYXBOXX_TRACE=1calls each registration and checks theE_NOTIMPLline on stderr. They fail with the runtime built before commit 6 (the two streaming ones, before the last commit).Checklist
E_NOTIMPL), never a fake success.test_readme_sync.pychecks it).Made with AI assistance (Claude Code, Claude Opus 5.5); tests run on the adapters above.
🤖 Generated with Claude Code
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-25T21:03:11Z.
Thanks, the offline interfaces return E_NOTIMPL or log where unimplemented, as rule 3 asks.
Some commit messages are in French (for example "docs: abonnements sans notification décrits ..." and "feat: XUser et périphériques ..."). Please reword them in English, or squash to an English message, per rule 7. If the zero-value answers of XNetworkingQueryConfigurationSetting and XNetworkingQueryStatistics come from a Microsoft Learn page, please cite it next to the code.
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-25T21:45:39Z.
Follow-up after the review: the Leonida point is fine now, thanks. Five of the six commit messages are still in French (91a80512, 3ac35273, 1850abd6, 52b6d6f8, 2cd5b95a); please reword them in English (
type: description) or squash into one English commit (rule 7), and rebase on main.Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-25T22:53:18Z.
Thanks. Updated and rebased on main
e921268(headbd9f16b):type: description. Commits 1-5 (feat: offline XGameStreaming…,feat: XGameUi without a system UI…,feat: PC network settings and high contrast…,feat: XUser devices…,docs: describe the subscriptions without notification…) are translations of the French originals, with author KainanP (noreply address) and the Co-Authored-By trailer.S_OK,E_INVALIDARGfor an unknown setting or type), not a fake success.Checks: full suite on the RTX 4060 → 1423 passed, 17 skipped (on
9a06443; the later rebase ontoe921268only brings #263's launcher test;test_readme_syncpasses, 1,441 tests collected → 1400+) (runtime rebuilt from this branch); ruff clean.AI use: Claude Code (Claude Opus 5.5).
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-26T00:06:48Z.
Thanks for rewording the commits in English. One thing left:
docs/images/carte-avancee.svgandtraduction.svgstill show 210/396; AGENTS.md asks to regenerate them withscarlett.py --carte ..and--traduction ..when the counts move. Also commit 1dd46828 says "8 languages" where 9 READMEs are concerned. Then it is ready.Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-26T09:07:20Z.
Rebased onto main
c4c93bdafter #230/#232/#235 merged (head08d8568); README recounted from the code: GDK runtime 277/396 in the 9 READMEs (main's text kept, only the GDK sentence and row changed), RDNA 2 line unchanged at main's 1,285/1,490, test count stays 1600+.Your two points:
docs/images/carte-avancee.svgandtraduction.svg: new commit08d8568re-renders their GDK parts withemu.status_map/emu.translationonruntime/xgameruntime(GDK badge, GDK section of the map, GDK row of the chart): 277/396, 30/34 interfaces. These parts depend only on the runtime sources. The other sections need the game package, which I don't have here, so they stay as on main. As a check, the same rendering from main's runtime sources gives main's images byte for byte.f08749c(was1dd46828) now says "README in 9 languages".Tests:
test_readme_sync, the four runtime test files of this PR,test_status_map,test_translation,test_gdk_interfaces,test_gdk_boot: 88 passed, 1 skipped; ruff clean. No code changed during the rebase (conflicts were README lines only), so I did not rerun the full suite.AI use: Claude Code (Claude Opus 5.5).
Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-26T13:02:44Z.
Merged main (
b5a9d10, with #351) into the branch and ported this PR's interfaces to the Rust runtime (headf494613).With #351,
tests/test_rust_dlls.pyruns the runtime test files againstcrates/anyxboxx-xgameruntimetoo. Before the port, the Rust DLL answeredE_NOTIMPLfor everything this PR adds, so that test failed (15 failed, 8 errors inside it). Commit68c1d51ports the same behaviour to the crate, following the approach #351 used for the existing interfaces (one module per interface, registered inserved.rs):streaming.rs:XGameStreamingwith no streaming client (documentedE_GAMESTREAMING_*codes, display-details checks;XGameStreamingSetResolutionstaysE_NOTIMPL).gameui.rs,gameui_input.rs,gameui_responses.rs,gameui_requests.rs:XGameUiscreens are handed to the game's callbacks through VIctory'sxasync. When the game gave no callback, the call returnsE_NOTIMPLand is logged.accessibility.rs:XHighContrastGetModereads Windows' real setting. Captions and speech stayE_NOTIMPL.user_device.rs: Windows' default communications endpoint and the all-zero controller id on PC.XUserRegisterForDeviceAssociationChangedandXUserRegisterForDefaultAudioEndpointUtf16ChangedreturnE_NOTIMPLand are logged.networking.rs: TCP buffer settings and statistics. The Microsoft Learn quotes forXNetworkingConfigurationSettingandXNetworkingStatisticsType("always 0 on PC") sit next to the code, as in the C++.XNetworkingRegisterConnectivityHintChangednow returnsE_NOTIMPLand is logged on the Rust side too. Main's Rust port still accepted that subscription without ever notifying it.The C++ side is unchanged (main still builds it as the oracle).
docs/rust-full-status.mdand its French version mention the port.Figures:
gdk_runtime_area()still reads the C++ tables. Those tables and the Rust tables now give the same answers, andtest_rust_dllschecks that they match. The count stays 277/396 (30/34 interfaces) and the README count stays 1800+ (1,835 tests collected). No README or image change.Checks on the RTX 4060, after building Rust with the CI profile and
runtime/with CMake:ANYXBOXX_REQUIRE_RUNTIME=1 pytest -n auto→ 1834 passed, 1 skipped.cargo test --release -p anyxboxx-xgameruntime→ 81 passed;cargo test --release --workspacepasses.cargo clippy -p anyxboxx-xgameruntime --all-targets -- -D warnings,cargo fmt --checkand ruff are clean.These results are from
68c1d51. The last main merge only brings.gitattributes(#359).AI use: Claude Code (Claude Opus 5.5).
Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-26T16:21:17Z.
Rebased onto main
ce0f90f(after #343 and #252), heade504a09: ten linear commits, the two merge commits are gone (previous head kept locally as tagpre-rebase-231c).gdk_runtime_area(), 30/34 interfaces). New commite504a09moves the test count to 1900+ (1,922 collected).ANYXBOXX_REQUIRE_RUNTIME=1,pytest -n auto) 1921 passed, 1 skipped, Rust xgameruntime parity (test_rust_dlls.py) included;cargo test -p anyxboxx-xgameruntime85 passed;cargo clippy -p anyxboxx-xgameruntime --all-targets -- -D warningsclean; ruff (W605,F,E9) clean.AI use: Claude Code (Claude Opus 5.5).
Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-26T18:26:06Z.
Rebased onto main
8e32daa(after #407), head3985aac(previous head kept locally as tagpre-rebase4-231).3985aac, puts this PR's figure back in both READMEs and lists the interfaces it serves (streaming, system dialogs, network settings, high contrast, audio devices). The old "test count 1900+" commit became empty and was dropped, because main already says 1900+.gdk_runtime_area()gives 277 of 396 (30/34 interfaces) on the rebased tree, against 210/396 (26/34) on main. The progress map and translation chart match. Test count 1900+ (1,930 collected).ANYXBOXX_REQUIRE_RUNTIME=1,pytest -n auto) 1929 passed, 1 skipped, with the Rust xgameruntime parity tests (test_rust_dlls.py).cargo test --release -p anyxboxx-xgameruntime87 passed.cargo clippy -p anyxboxx-xgameruntime --all-targets -- -D warnings,cargo fmt --checkand ruff (W605,F,E9) are clean.AI use: Claude Code (Claude Opus 5.5).
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T16:24:25Z.
One point on rule 3 before merge:
XGameStreamingRegisterConnectionStateChanged(crates/anyxboxx-xgameruntime/src/streaming.rs,register_connection_state_changed) returnsS_OKand a token throughevents::add_subscription, but its callback can never run. That is the "registration that succeeds and never notifies" case we turned intoE_NOTIMPLelsewhere (#156), and the three other registrations in this PR follow it. Please either returnE_NOTIMPLwith a log here too, or say in the description why a connection-state registration is different (for example a measured title that fails onE_NOTIMPLhere). The rest of the interface answers (disconnected, PC values from Microsoft Learn) look fine.Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-27T16:53:20Z.
Done:
XGameStreamingRegisterConnectionStateChangednow returnsE_NOTIMPL+ log like the other three (slot 12 isANYXBOXX_NOT_IMPLEMENTEDin C++ andnot_implementedin Rust, no token written; the unregister returnsfalse). Tests: the streaming subscription test expectsE_NOTIMPLwith an untouched token, and theANYXBOXX_TRACE=1test covers slot 12. GDK counter 277 → 276/396 (README EN/FR, GDK parts of the two images, docs list the four subscriptions). Rebased onmaina445308; full suite 1991 passed / 1 skipped on the RTX 4060 (incl. Rust-vs-C++ parity), cargo test/clippy/fmt clean. Commit0048145.AI use: Claude Code (Claude Opus 5.5).
Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-27T19:30:17Z.
Rebased onto main
3e3dd53e; head is now31b72380.Cargo.toml(main'sWin32_System_Environment, ourWin32_Graphics_Gdi).unsupported.txtnow lists the generic refusals of the four new interfaces, including the change subscriptions that are never notified. It also listsXNetworkingSetConfigurationSettingas an explicit PC refusal. The TCP buffer query and the statistics come off the list.test_rust_xgameruntime_parity.pynow checks 30 pairs. Only the GDK parts of both images were regenerated.cargo build/test --release -p anyxboxx-xgameruntime(87 tests), clippy-D warnings,fmt --checkand ruff. WithANYXBOXX_REQUIRE_RUNTIME=1, these also passed:test_rust_xgameruntime_parity.py,test_rust_dlls.py,test_rust_carte_parity.py, the gameui, streaming, user_device and platform runtime tests, andtest_readme_sync.py. Full suite on31b72380:ANYXBOXX_REQUIRE_RUNTIME=1 python -m pytest -n auto→ 1996 passed, 0 skipped (includestest_rust_dlls.py).AI use: Claude Code (Claude Opus 5.5).
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T19:30:23Z.
Thanks! #538 has just been merged: the shipped
xgameruntime.dllis now the Rust one (crates/anyxboxx-xgameruntime), and the C++ DLL only remains as the parity oracle. The GDK functions this PR adds to the C++ runtime would therefore not be shipped. Could you port them to the Rust crate (keeping the C++ side only if the parity tests need it) and rebase on main? The rest of the ready PRs went in through #545.Imported from LooperSalty/AnyXboxX. Originally posted by KainanP on 2026-11-27T19:53:57Z.
Rebased onto
mainec3b7348(after #545). The head is nowdd00e22f.The interfaces were already in the Rust crate. The earlier rebase onto #538 included commit
8f68a212, "port the offline GDK interfaces to the Rust xgameruntime". So thexgameruntime.dllthat ships already serves all four new pairs fromcrates/anyxboxx-xgameruntime/src/:streaming.rsgameui.rswithgameui_input.rs,gameui_requests.rsandgameui_responses.rsaccessibility.rsuser_device.rsnetworking.rsThey give the same answers as before. The four change subscriptions that are never notified still return
E_NOTIMPL+ log, with no token written. The Microsoft Learn citations stay next to the Rust code.Why the C++ side is kept. The parity tests from #538 need it:
test_rust_dlls.py::test_runtime_suite[cpp]runs everytest_runtime_*.py(including the new gameui, streaming, user_device and platform tests) against the C++ oracle.test_rust_xgameruntime_parity.pybuilds its interface matrix fromserved_interfaces.inc/gdk_api_table.inc. It expects 30 pairs, the same stub placement andrust == cpp, and it checks the result againstunsupported.txt.gdk_runtime_area()counts from the same C++ tables.Without the C++ handlers, the oracle would stop matching and those tests would fail. The C++ files are now used only as the oracle.
docs/rust-full-status.md(EN/FR) says that and names the Rust files that ship.What changed in this rebase:
gdk_runtime_area()on the merged tree: still 263/396, 30/34 interfaces. So README,unsupported.txtand the GDK parts of both images stay as they were.Tests on
dd00e22f:rust_dllsstep. The installed DLL is byte-identical totarget/release.ANYXBOXX_REQUIRE_RUNTIME=1 python -m pytest -n auto: 2006 passed, 0 skipped. This includestest_rust_dlls.py(rust + cpp),test_rust_xgameruntime_parity.pyandtest_readme_sync.py.cargo test --release -p anyxboxx-xgameruntime: 87 passed.-D warningsandfmt --checkare clean.AI use: Claude Code (Claude Opus 5.5).
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.