feat: offline GDK interfaces (XGameStreaming, XGameUi, XNetworking, XAccessibility, XUser), unnotified subscriptions in E_NOTIMPL — 277/396 #231

Open
github-bot wants to merge 7 commits from github-bot/gh-231 into main AGit
Owner

@⁠KainanP on GitHub · 2026-11-25 19:49 UTC · original
KainanP:feat/gdk-offline-interfaces → main · +1520 −43 · 26 files · 7 commits · open

Supersedes #217 (closed by the maintainer for conflicts; rebased onto main 4f2cf5c as 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 on main, so the rebase dropped it; the suite collects 1,355 tests (1300+, already on main).

Change

New version of #156, as asked in the maintainer's closing note (#156): the offline GDK interfaces come back unchanged, and the change subscriptions that AnyXboxX never notifies now return E_NOTIMPL and are logged, instead of S_OK with a token.

Linked issue: Refs #156

  • Commits 1–5 are #156's commits, rebased on main (now 400e590), their messages translated into English (rule 7): XGameStreaming with no streaming client, XGameUi handed to the game's own UI callbacks, the PC's network settings and high-contrast mode (XNetworking, XAccessibility), XUser devices (Windows' default communications audio endpoint, the all-zero controller id documented for PC).
  • Commit 7 (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 return S_OK with these documented values, and an unknown setting or type returns E_INVALIDARG, as the function pages say.
  • Commit 6 (fix: change subscriptions that are never notified return E_NOTIMPL) is the rule 3 fix. XNetworkingRegisterConnectivityHintChanged and XUserRegisterForDefaultAudioEndpointUtf16Changed are wired to ANYXBOXX_NOT_IMPLEMENTED: E_NOTIMPL, the trace line [runtime] méthode d'interface non écrite appelée -> E_NOTIMPL with ANYXBOXX_TRACE=1, no token written. Their unregister functions return false (no registration can succeed). The queries (XNetworkingGetConnectivityHint, XUserGetDefaultAudioEndpointUtf16) still return the current value.
  • One addition to the two functions named in the closing note: XUserRegisterForDeviceAssociationChanged had the same pattern (S_OK, token, callback never called; it was in the first review of #156 next to the audio endpoint), so it returns E_NOTIMPL too. If you prefer it left as it was, it is one table line in user_device_interface.cpp and one test parameter to revert.
  • Because the three registrations are now ANYXBOXX_NOT_IMPLEMENTED in the tables, the GDK runtime counter drops from 280 to 277 of 396 (README in 9 languages). docs/progress.md and docs/fr/avancee.md: the "Subscriptions" section now says E_NOTIMPL + log and cites the decision on #156.
  • Left as is (not in the closing note, and the event cannot happen in AnyXboxX): XGameStreamingRegisterConnectionStateChanged (no streaming client can ever connect) and XStoreRegisterGameLicenseChanged (already on main; the offline license never changes).
  • Images: carte-avancee.svg and traduction.svg are those of main, to be regenerated at merge with the package, as agreed on #156.

Verification

Windows 11 26200, Python 3.12, runtime built from this branch (VS 2022 Build Tools, CMake), on top of main at e921268:

python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools → All checks passed!
python -m pytest (RTX 4060)                → 1423 passed, 17 skipped (on main 9a06443; the rebase onto e921268 only adds #263's launcher test)
ANYXBOXX_REQUIRE_RUNTIME=1 python -m pytest tests/test_runtime_*.py → 86 passed

Each commit checked: README test count (1300+) = collected tests rounded down (1337 to 1355); GDK counter in the README = translation.gdk_runtime_area() (241, 269, 273, 280, 280, 277).

Oracle and test data

  • Rule 3 tests: the three registrations return E_NOTIMPL and leave the caller's token untouched, the unregisters return false; a subprocess with ANYXBOXX_TRACE=1 calls each registration and checks the E_NOTIMPL line on stderr. The five tests fail with the runtime built before commit 6.
  • The rest is unchanged from #156: Microsoft Learn pages cited next to each function; Windows itself as the oracle (IMMDeviceEnumerator, Network List Manager, SPI_GETHIGHCONTRAST). All test data is built in the tests.

Checklist

  • The PR covers a single reviewable behaviour (the offline interfaces of #156, with the rule 3 fix).
  • A test fails without this change and passes with it.
  • The commands and results of each check are given above.
  • An unimplemented function returns an error (E_NOTIMPL), never a fake success.
  • README: the same change in all 9 languages (test_readme_sync.py checks it).
  • No game, console or SDK file, no key, no dump, no download link.
  • Findings drawn from a title: none.
  • Code taken from another project: none.

Made with AI assistance (Claude Code, Claude Opus 5.5); tests run on the adapters above.

🤖 Generated with Claude Code

**@⁠KainanP** on GitHub · 2026-11-25 19:49 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/231) `KainanP:feat/gdk-offline-interfaces` → `main` · +1520 −43 · 26 files · 7 commits · open Supersedes #217 (closed by the maintainer for conflicts; rebased onto main 4f2cf5c as 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 on `main`, so the rebase dropped it; the suite collects 1,355 tests (`1300+`, already on `main`). ## Change New version of #156, as asked in the maintainer's closing note (https://git.gtahub.st/github/LooperSalty--AnyXboxX/pulls/156): the offline GDK interfaces come back unchanged, and the change subscriptions that AnyXboxX never notifies now return `E_NOTIMPL` and are logged, instead of `S_OK` with a token. Linked issue: Refs #156 - Commits 1–5 are #156's commits, rebased on `main` (now `400e590`), their messages translated into English (rule 7): `XGameStreaming` with no streaming client, `XGameUi` handed to the game's own UI callbacks, the PC's network settings and high-contrast mode (`XNetworking`, `XAccessibility`), `XUser` devices (Windows' default communications audio endpoint, the all-zero controller id documented for PC). - Commit 7 (`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](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/networking/xnetworking/enums/xnetworkingconfigurationsetting) says for each of the three settings: "Retrieving this setting on PC will always report the value 0". [XNetworkingStatisticsType](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/networking/xnetworking/enums/xnetworkingstatisticstype) says for each of the three types: "On PC, all statistics in the structure are always reported as 0". Both functions return `S_OK` with these documented values, and an unknown setting or type returns `E_INVALIDARG`, as the function pages say. - Commit 6 (`fix: change subscriptions that are never notified return E_NOTIMPL`) is the rule 3 fix. `XNetworkingRegisterConnectivityHintChanged` and `XUserRegisterForDefaultAudioEndpointUtf16Changed` are wired to `ANYXBOXX_NOT_IMPLEMENTED`: `E_NOTIMPL`, the trace line `[runtime] méthode d'interface non écrite appelée -> E_NOTIMPL` with `ANYXBOXX_TRACE=1`, no token written. Their unregister functions return `false` (no registration can succeed). The queries (`XNetworkingGetConnectivityHint`, `XUserGetDefaultAudioEndpointUtf16`) still return the current value. - **One addition to the two functions named in the closing note:** `XUserRegisterForDeviceAssociationChanged` had the same pattern (`S_OK`, token, callback never called; it was in the first review of #156 next to the audio endpoint), so it returns `E_NOTIMPL` too. If you prefer it left as it was, it is one table line in `user_device_interface.cpp` and one test parameter to revert. - Because the three registrations are now `ANYXBOXX_NOT_IMPLEMENTED` in the tables, the GDK runtime counter drops from 280 to **277 of 396** (README in 9 languages). `docs/progress.md` and `docs/fr/avancee.md`: the "Subscriptions" section now says `E_NOTIMPL` + log and cites the decision on #156. - Left as is (not in the closing note, and the event cannot happen in AnyXboxX): `XGameStreamingRegisterConnectionStateChanged` (no streaming client can ever connect) and `XStoreRegisterGameLicenseChanged` (already on `main`; the offline license never changes). - Images: `carte-avancee.svg` and `traduction.svg` are those of `main`, to be regenerated at merge with the package, as agreed on #156. ## Verification Windows 11 26200, Python 3.12, runtime built from this branch (VS 2022 Build Tools, CMake), on top of `main` at `e921268`: ``` python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools → All checks passed! python -m pytest (RTX 4060) → 1423 passed, 17 skipped (on main 9a06443; the rebase onto e921268 only adds #263's launcher test) ANYXBOXX_REQUIRE_RUNTIME=1 python -m pytest tests/test_runtime_*.py → 86 passed ``` Each commit checked: README test count (`1300+`) = collected tests rounded down (1337 to 1355); GDK counter in the README = `translation.gdk_runtime_area()` (241, 269, 273, 280, 280, 277). ## Oracle and test data - Rule 3 tests: the three registrations return `E_NOTIMPL` and leave the caller's token untouched, the unregisters return `false`; a subprocess with `ANYXBOXX_TRACE=1` calls each registration and checks the `E_NOTIMPL` line on stderr. The five tests fail with the runtime built before commit 6. - The rest is unchanged from #156: Microsoft Learn pages cited next to each function; Windows itself as the oracle (IMMDeviceEnumerator, Network List Manager, SPI_GETHIGHCONTRAST). All test data is built in the tests. ## Checklist - [x] The PR covers a single reviewable behaviour (the offline interfaces of #156, with the rule 3 fix). - [x] A test fails without this change and passes with it. - [x] The commands and results of each check are given above. - [x] An unimplemented function returns an error (`E_NOTIMPL`), never a fake success. - [x] README: the same change in all 9 languages (`test_readme_sync.py` checks it). - [x] No game, console or SDK file, no key, no dump, no download link. - [x] Findings drawn from a title: none. - [x] Code taken from another project: none. Made with AI assistance (Claude Code, Claude Opus 5.5); tests run on the adapters above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Serves the XGameStreaming interface (31 of 32 functions) when AnyXboxX
provides the runtime. The game runs on the PC and no device receives it:
no client (IsStreaming false, 0 clients, state Disconnected), questions
about a client answer E_GAMESTREAMING_CLIENT_NOT_CONNECTED, the latency
E_GAMESTREAMING_NO_DATA, the datacenter E_GAMESTREAMING_NO_DATACENTER, a
local controller E_GAMESTREAMING_NOT_STREAMING_CONTROLLER, and the APIs
require XGameStreamingInitialize (E_GAMESTREAMING_NOT_INITIALIZED), as
Microsoft Learn documents. XGameStreamingSetResolution stays E_NOTIMPL:
the page does not say what a console that is not streaming answers.
GDK runtime: 241/396 functions, 8 tests added (655), README in 8
languages and maps updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Serves the XGameUi interface (28 of 42 functions) when AnyXboxX provides
the runtime. Without Gaming Services there is no system UI: if the game
has supplied its own screens through XGameUiSetUiCallbacks (the path
Microsoft Learn documents), each XGameUiShow*Async (message box, text
entry, player picker, error, profile card, invites, achievements) calls
the game's callback on its queue and returns the answer the game gives
through XGameUiSet*UiResponse; the handle is accepted only once, and not
after a cancellation (E_ABORT). Without a callback the call fails with
E_NOTIMPL: no user answer is invented. XGameUiSetNotificationPositionHint
succeeds without effect, as on Windows. Web authentication, storage
space, state sharing and the virtual keyboard (XGameUiTextEntry*) stay
E_NOTIMPL.
GDK runtime: 269/396 functions, 7 tests added (662), README in 8
languages and maps updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
XNetworking: XNetworkingQueryConfigurationSetting,
XNetworkingSetConfigurationSetting and XNetworkingQueryStatistics answer
as Microsoft Learn documents for the PC, where the console's TCP receive
buffers do not exist: reads return 0, changes E_NOTIMPL, statistics all
0, E_INVALIDARG for an unknown setting. The preferred UDP port and URL
security stay E_NOTIMPL.
XAccessibility: interface served, XHighContrastGetMode reads Windows' high
contrast mode (SPI_GETHIGHCONTRAST, dark or light from the theme's
background). Closed captions, text-to-speech and speech-to-text stay
E_NOTIMPL.
GDK runtime: 273/396 functions, 3 tests added (665), README in 8
languages and maps updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Serves the XUser device interface (7 of 8 functions) when AnyXboxX
provides the runtime: XUserGetDefaultAudioEndpointUtf16 returns the id of
Windows' default communications device (IMMDeviceEnumerator, E_NOTFOUND
without a device, E_GAMEUSER_USER_NOT_FOUND for another profile),
XUserFindControllerForUserWithUiAsync completes without a window with an
all-zero controller id, as Microsoft Learn documents for the PC, and the
subscriptions to association and audio device changes get a token
without a callback. XUserFindForDevice stays E_NOTIMPL.
GDK runtime: 280/396 functions, 5 tests added (670), README in 8
languages and maps updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review of #156:
1. Subscriptions that succeed without ever calling the callback
   (XNetworkingRegisterConnectivityHintChanged,
   XUserRegisterForDeviceAssociationChanged,
   XUserRegisterForDefaultAudioEndpointUtf16Changed): the choice to keep
   the token, now written next to each function and in docs/progress.md
   ("Subscriptions: a token without notification") and
   docs/fr/avancee.md: change not tracked, current value to be read
   again, and why not E_NOTIMPL (a refused registration can be fatal to
   a title's start-up).
2. carte-avancee.svg and traduction.svg: the package is not on this
   machine, so a full regeneration is not possible here; the images go
   back to their version on main (the partial regeneration of the GDK
   section is removed) to be regenerated at merge.

Comments only in the C++ (runtime rebuilt, tests green).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
XNetworkingRegisterConnectivityHintChanged,
XUserRegisterForDeviceAssociationChanged and
XUserRegisterForDefaultAudioEndpointUtf16Changed returned S_OK and a
token although AnyXboxX does not track the change they report, so the
callback was never called: a success without effect, which rule 3
forbids. The maintainer chose not to add an exception to rule 3 (#156).

They are now wired to ANYXBOXX_NOT_IMPLEMENTED: E_NOTIMPL, logged by
the trace (ANYXBOXX_TRACE=1), no token written, and counted as not
written by the GDK runtime counter (280 -> 277 of 396, README in 9
languages). Unregistering returns false: no registration can succeed.
The matching queries (XNetworkingGetConnectivityHint,
XUserGetDefaultAudioEndpointUtf16) still return the current value.
docs/progress.md and docs/fr/avancee.md describe the new behaviour.

Tests: E_NOTIMPL and the token left untouched for the three
registrations, unregister false, and the trace line in a subprocess
with ANYXBOXX_TRACE=1; the five tests fail with the previous runtime.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
XNetworkingQueryConfigurationSetting returns 0 and XNetworkingQueryStatistics
all-zero statistics because Microsoft Learn documents those answers for the
PC: "Retrieving this setting on PC will always report the value 0."
(XNetworkingConfigurationSetting, for each of the three settings) and "On
PC, all statistics in the structure are always reported as 0."
(XNetworkingStatisticsType, for each of the three types). The exact page
URLs now sit next to each function. Comment only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:38:58 +00:00
Author
Owner

@⁠LooperSalty on GitHub · 2026-11-25 21:03 UTC · original

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.

**@⁠LooperSalty** on GitHub · 2026-11-25 21:03 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/231#issuecomment-7174544424) 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.
Author
Owner

@⁠LooperSalty on GitHub · 2026-11-25 21:45 UTC · original

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.

**@⁠LooperSalty** on GitHub · 2026-11-25 21:45 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/231#issuecomment-7175503987) 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.
Author
Owner

@⁠KainanP on GitHub · 2026-11-25 22:53 UTC · original

Thanks. Updated and rebased on main e921268 (head bd9f16b):

  • All commit messages are now in English, as 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.
  • New commit 7 (comment only) puts the Microsoft Learn source 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 type: "On PC, all statistics in the structure are always reported as 0." So the two queries return documented values (S_OK, E_INVALIDARG for an unknown setting or type), not a fake success.
  • README conflicts resolved: main's RDNA 2 figures kept, GDK 277/396, tests still 1400+.

Checks: full suite on the RTX 4060 → 1423 passed, 17 skipped (on 9a06443; the later rebase onto e921268 only brings #263's launcher test; test_readme_sync passes, 1,441 tests collected → 1400+) (runtime rebuilt from this branch); ruff clean.

AI use: Claude Code (Claude Opus 5.5).

**@⁠KainanP** on GitHub · 2026-11-25 22:53 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/231#issuecomment-7176902340) Thanks. Updated and rebased on main `e921268` (head `bd9f16b`): - All commit messages are now in English, as `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. - New commit 7 (comment only) puts the Microsoft Learn source next to the code. [XNetworkingConfigurationSetting](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/networking/xnetworking/enums/xnetworkingconfigurationsetting) says for each of the three settings: "Retrieving this setting on PC will always report the value 0." [XNetworkingStatisticsType](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/networking/xnetworking/enums/xnetworkingstatisticstype) says for each type: "On PC, all statistics in the structure are always reported as 0." So the two queries return documented values (`S_OK`, `E_INVALIDARG` for an unknown setting or type), not a fake success. - README conflicts resolved: main's RDNA 2 figures kept, GDK 277/396, tests still 1400+. Checks: full suite on the RTX 4060 → 1423 passed, 17 skipped (on `9a06443`; the later rebase onto `e921268` only brings #263's launcher test; `test_readme_sync` passes, 1,441 tests collected → 1400+) (runtime rebuilt from this branch); ruff clean. _AI use: Claude Code (Claude Opus 5.5)._
Author
Owner

@⁠LooperSalty on GitHub · 2026-11-26 00:06 UTC · original

Thanks for rewording the commits in English. One thing left: docs/images/carte-avancee.svg and traduction.svg still show 210/396; AGENTS.md asks to regenerate them with scarlett.py --carte .. and --traduction .. when the counts move. Also commit 1dd46828 says "8 languages" where 9 READMEs are concerned. Then it is ready.

**@⁠LooperSalty** on GitHub · 2026-11-26 00:06 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/231#issuecomment-7178408389) Thanks for rewording the commits in English. One thing left: `docs/images/carte-avancee.svg` and `traduction.svg` still show 210/396; AGENTS.md asks to regenerate them with `scarlett.py --carte ..` and `--traduction ..` when the counts move. Also commit 1dd46828 says "8 languages" where 9 READMEs are concerned. Then it is ready.
This pull request has changes conflicting with the target branch.
  • README.md
  • docs/i18n/README.de.md
  • docs/i18n/README.es.md
  • docs/i18n/README.fr.md
  • docs/i18n/README.it.md
  • docs/i18n/README.ja.md
  • docs/i18n/README.pt-BR.md
  • docs/i18n/README.ru.md
  • docs/i18n/README.zh-CN.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/231/head:github-bot/gh-231'
git switch 'github-bot/gh-231'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-231'
git switch 'github-bot/gh-231'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-231'
git switch 'github-bot/gh-231'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-231'
git switch 'main'
git merge --squash 'github-bot/gh-231'
git switch 'main'
git merge --ff-only 'github-bot/gh-231'
git switch 'main'
git merge 'github-bot/gh-231'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.