XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL #2779

Open
github-bot wants to merge 1 commit from github-bot/gh-2779 into main AGit
Owner

@⁠timesecay on GitHub · 2026-11-26 12:15 UTC · original
timesecay:xgameui-refuse-dialogs → main · +178 −6 · 1 files · 1 commits · open

XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL

Seven XGameUi dialog types that need Xbox Live or an account (player picker, profile card, send
game invite, state share, multiplayer activity invite, achievements, web authentication; 17
entry points in all) were unknown slots on XCL's XGameUi class. They are now handled
explicitly: each *Async completes its XAsyncBlock at once with E_NOTIMPL, and each
*Result returns that status.

What is in it

  • crates/xcl/src/hle/xgameruntime/api.rs: ui_refused, ui_refused_fns! and xgameui_refused()
    register the 17 functions on the XGameUi class (built on the existing begin_with and
    empty_result helpers). The class's impls was empty before.
  • api.rs header comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime.
  • api.rs tests: the new refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone,
    and the old E_NOTIMPL + unimplemented assertion in thunk_protocol_with_xcl_objects_on_pc_queues
    rewritten for the new behaviour.
  • HANDOFF.md (~L1029): its "not implemented in XCL classes" counts are now stale for these
    functions. Left unedited, as the repository rules ask.

The 17 functions

Async entry points (8):
XGameUiShowAchievementsAsync, XGameUiShowPlayerPickerAsync, XGameUiShowPlayerProfileCardAsync,
XGameUiShowSendGameInviteAsync, XGameUiShowStateShareAsync,
XGameUiShowMultiplayerActivityGameInviteAsync, XGameUiShowWebAuthenticationAsync,
XGameUiShowWebAuthenticationWithOptionsAsync

Result / status entry points (9):
XGameUiShowAchievementsResult, XGameUiShowPlayerPickerResultCount, XGameUiShowPlayerPickerResult,
XGameUiShowPlayerProfileCardResult, XGameUiShowSendGameInviteResult, XGameUiShowStateShareResult,
XGameUiShowMultiplayerActivityGameInviteResult, XGameUiShowWebAuthenticationResultSize,
XGameUiShowWebAuthenticationResult

Behaviour

  • Every *Async returns S_OK, completes the block with E_NOTIMPL and delivers the completion
    callback once. It logs XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL).
  • Every *Result returns the call's status (E_NOTIMPL) and does not write its output
    arguments (counts, sizes, player ids, result pointer, buffer).
  • The handlers read only the first argument, the XAsyncBlock*; every GDK signature for these
    functions has it first. The slot shims pass the remaining arguments through, which relies on
    the Win64 caller cleaning up its stack, as
    @'
    XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL

Seven XGameUi dialog types that need Xbox Live or an account (player picker, profile card, send
game invite, state share, multiplayer activity invite, achievements, web authentication; 17
entry points in all) were unknown slots on XCL's XGameUi class. They are now handled
explicitly: each *Async completes its XAsyncBlock at once with E_NOTIMPL, and each
*Result returns that status.

What is in it

  • crates/xcl/src/hle/xgameruntime/api.rs: ui_refused, ui_refused_fns! and xgameui_refused()
    register the 17 functions on the XGameUi class (built on the existing begin_with and
    empty_result helpers). The class's impls was empty before.
  • api.rs header comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime.
  • api.rs tests: the new refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone,
    and the old E_NOTIMPL + unimplemented assertion in thunk_protocol_with_xcl_objects_on_pc_queues
    rewritten for the new behaviour.
  • HANDOFF.md (~L1029): its "not implemented in XCL classes" counts are now stale for these
    functions. Left unedited, as the repository rules ask.

The 17 functions

Async entry points (8):
XGameUiShowAchievementsAsync, XGameUiShowPlayerPickerAsync, XGameUiShowPlayerProfileCardAsync,
XGameUiShowSendGameInviteAsync, XGameUiShowStateShareAsync,
XGameUiShowMultiplayerActivityGameInviteAsync, XGameUiShowWebAuthenticationAsync,
XGameUiShowWebAuthenticationWithOptionsAsync

Result / status entry points (9):
XGameUiShowAchievementsResult, XGameUiShowPlayerPickerResultCount, XGameUiShowPlayerPickerResult,
XGameUiShowPlayerProfileCardResult, XGameUiShowSendGameInviteResult, XGameUiShowStateShareResult,
XGameUiShowMultiplayerActivityGameInviteResult, XGameUiShowWebAuthenticationResultSize,
XGameUiShowWebAuthenticationResult

Behaviour

  • Every *Async returns S_OK, completes the block with E_NOTIMPL and delivers the completion
    callback once. It logs XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL).
  • Every *Result returns the call's status (E_NOTIMPL) and does not write its output
    arguments (counts, sizes, player ids, result pointer, buffer).
  • The handlers read only the first argument, the XAsyncBlock*; every GDK signature for these
    functions has it first. The slot shims pass the remaining arguments through, which relies on
    the Win64 caller cleaning up its stack, as the existing completed() handlers do. That is an
    assumption about the existing dispatch machinery; no test isolates it.
  • The message, error and text dialogs are unchanged (still forwarded to the PC runtime).

Side effect on report.json

These calls are no longer counted under xgameruntime.unimplemented, because they are no longer
unknown slots. Anyone using that list to find gaps will stop seeing them; the log line above is
the replacement.

Tested

  • Hardware: NVIDIA GeForce RTX 5060 Ti, driver 610.88 (WDDM); Windows 11 Pro 25H2 (OS build 26200);
    stable-x86_64-pc-windows-msvc, rustc 1.100.0 (0ef1bc386 2026-11-09). Debug build for tests,
    release build for smoke. The machine was not idle during the runs (browsers, capture and
    chat apps were open).
  • Based on main b49be18368 plus one commit,
    58eb182e73.
  • cargo test --workspace -j 1 --no-fail-fast -- --test-threads=1: cargo exit 0;
    1,436 passed, 0 failed, 47 ignored (37 test binaries). The log has 45 SKIPPED lines;
    those tests pass without running and are not coverage.
  • Coverage of the 17 names:
    • thunk_protocol_with_xcl_objects_on_pc_queues (existing, edited) covers 3:
      XGameUiShowAchievementsAsync, XGameUiShowAchievementsResult and
      XGameUiShowWebAuthenticationWithOptionsAsync. It runs on the PC runtime's queues.
    • refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone (new) covers all 17
      through their vtable slots on XCL's own queues. It checks S_OK from each Async, one
      completion callback per call, XAsyncGetStatus = E_NOTIMPL, every Result = E_NOTIMPL,
      untouched output buffers, E_INVALIDARG for a never-started block and for a null block.
    • Mutation check: a handler completing with S_OK, and a missing WithOptions registration,
      each made the new test fail; both were reverted.
  • Cleanup of a failed block's payload is covered by the existing
    errors_propagate_and_release_active_state, not by the new test.

Regression run

Same game folder, 60 seconds, same title for both. main first:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5060 Ti
title: TestGame
seconds: 60
exit: 0x0
frames shown: 1483 (PresentX 1483)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16027 MB

This change:

xcl-smoke v1
commit: 58eb182e73edd5c3f241bcd2e982ce55cc92d729
gpu: NVIDIA GeForce RTX 5060 Ti
title: TestGame
seconds: 60
exit: 0x0
frames shown: 1329 (PresentX 1329)
presents per 2 s (last 3): 60 60 59
device removals: 0
crashes: 0
peak commit: 16229 MB

Not tested

  • Whether the title in the smoke runs called any of the 17 functions; the blocks don't show it.
  • How a real title reacts to E_NOTIMPL (it may treat it as fatal rather than as a dismissed dialog).
  • Behaviour of the 14 other names on the PC runtime's queues (only 3 are covered there).
  • A duplicate completion callback arriving more than 20 ms after the first would not be seen.
  • AMD / RDNA4 and other NVIDIA models.
  • Out of scope and unchanged: XGameUiSet*UIResponse and XGameUISetUICallbacks (not in the
    generated GDK table), XGameProtocol*.
  • Duplicate-PR search: gh pr list --state all --search "XGameUi" (5 results) and "E_NOTIMPL"
    (29 results, first 20 listed). I checked #2623, #1610, #12, #24, #270 and #1537: none registers
    handlers for these XGameUi functions. #24 (merged) added the test assertion this PR changes.
    #2623, #1610, #270 and #1537 edit api.rs and may need a rebase.

AI use
Claude Code, model: not recorded. It wrote the handlers, the tests and a draft of this description, read the
function signatures from the public GDK reference, and ran the build and test commands. timesecay
reviewed the diff and is the author.

**@⁠timesecay** on GitHub · 2026-11-26 12:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/2779) `timesecay:xgameui-refuse-dialogs` → `main` · +178 −6 · 1 files · 1 commits · open XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL Seven XGameUi dialog types that need Xbox Live or an account (player picker, profile card, send game invite, state share, multiplayer activity invite, achievements, web authentication; 17 entry points in all) were unknown slots on XCL's XGameUi class. They are now handled explicitly: each `*Async` completes its `XAsyncBlock` at once with `E_NOTIMPL`, and each `*Result` returns that status. **What is in it** - `crates/xcl/src/hle/xgameruntime/api.rs`: `ui_refused`, `ui_refused_fns!` and `xgameui_refused()` register the 17 functions on the XGameUi class (built on the existing `begin_with` and `empty_result` helpers). The class's `impls` was empty before. - `api.rs` header comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime. - `api.rs` tests: the new `refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone`, and the old `E_NOTIMPL` + `unimplemented` assertion in `thunk_protocol_with_xcl_objects_on_pc_queues` rewritten for the new behaviour. - `HANDOFF.md` (~L1029): its "not implemented in XCL classes" counts are now stale for these functions. Left unedited, as the repository rules ask. **The 17 functions** Async entry points (8): `XGameUiShowAchievementsAsync`, `XGameUiShowPlayerPickerAsync`, `XGameUiShowPlayerProfileCardAsync`, `XGameUiShowSendGameInviteAsync`, `XGameUiShowStateShareAsync`, `XGameUiShowMultiplayerActivityGameInviteAsync`, `XGameUiShowWebAuthenticationAsync`, `XGameUiShowWebAuthenticationWithOptionsAsync` Result / status entry points (9): `XGameUiShowAchievementsResult`, `XGameUiShowPlayerPickerResultCount`, `XGameUiShowPlayerPickerResult`, `XGameUiShowPlayerProfileCardResult`, `XGameUiShowSendGameInviteResult`, `XGameUiShowStateShareResult`, `XGameUiShowMultiplayerActivityGameInviteResult`, `XGameUiShowWebAuthenticationResultSize`, `XGameUiShowWebAuthenticationResult` **Behaviour** - Every `*Async` returns `S_OK`, completes the block with `E_NOTIMPL` and delivers the completion callback once. It logs `XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL)`. - Every `*Result` returns the call's status (`E_NOTIMPL`) and does not write its output arguments (counts, sizes, player ids, result pointer, buffer). - The handlers read only the first argument, the `XAsyncBlock*`; every GDK signature for these functions has it first. The slot shims pass the remaining arguments through, which relies on the Win64 caller cleaning up its stack, as @' XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL Seven XGameUi dialog types that need Xbox Live or an account (player picker, profile card, send game invite, state share, multiplayer activity invite, achievements, web authentication; 17 entry points in all) were unknown slots on XCL's XGameUi class. They are now handled explicitly: each `*Async` completes its `XAsyncBlock` at once with `E_NOTIMPL`, and each `*Result` returns that status. **What is in it** - `crates/xcl/src/hle/xgameruntime/api.rs`: `ui_refused`, `ui_refused_fns!` and `xgameui_refused()` register the 17 functions on the XGameUi class (built on the existing `begin_with` and `empty_result` helpers). The class's `impls` was empty before. - `api.rs` header comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime. - `api.rs` tests: the new `refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone`, and the old `E_NOTIMPL` + `unimplemented` assertion in `thunk_protocol_with_xcl_objects_on_pc_queues` rewritten for the new behaviour. - `HANDOFF.md` (~L1029): its "not implemented in XCL classes" counts are now stale for these functions. Left unedited, as the repository rules ask. **The 17 functions** Async entry points (8): `XGameUiShowAchievementsAsync`, `XGameUiShowPlayerPickerAsync`, `XGameUiShowPlayerProfileCardAsync`, `XGameUiShowSendGameInviteAsync`, `XGameUiShowStateShareAsync`, `XGameUiShowMultiplayerActivityGameInviteAsync`, `XGameUiShowWebAuthenticationAsync`, `XGameUiShowWebAuthenticationWithOptionsAsync` Result / status entry points (9): `XGameUiShowAchievementsResult`, `XGameUiShowPlayerPickerResultCount`, `XGameUiShowPlayerPickerResult`, `XGameUiShowPlayerProfileCardResult`, `XGameUiShowSendGameInviteResult`, `XGameUiShowStateShareResult`, `XGameUiShowMultiplayerActivityGameInviteResult`, `XGameUiShowWebAuthenticationResultSize`, `XGameUiShowWebAuthenticationResult` **Behaviour** - Every `*Async` returns `S_OK`, completes the block with `E_NOTIMPL` and delivers the completion callback once. It logs `XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL)`. - Every `*Result` returns the call's status (`E_NOTIMPL`) and does not write its output arguments (counts, sizes, player ids, result pointer, buffer). - The handlers read only the first argument, the `XAsyncBlock*`; every GDK signature for these functions has it first. The slot shims pass the remaining arguments through, which relies on the Win64 caller cleaning up its stack, as the existing `completed()` handlers do. That is an assumption about the existing dispatch machinery; no test isolates it. - The message, error and text dialogs are unchanged (still forwarded to the PC runtime). **Side effect on `report.json`** These calls are no longer counted under `xgameruntime.unimplemented`, because they are no longer unknown slots. Anyone using that list to find gaps will stop seeing them; the log line above is the replacement. **Tested** - Hardware: NVIDIA GeForce RTX 5060 Ti, driver 610.88 (WDDM); Windows 11 Pro 25H2 (OS build 26200); stable-x86_64-pc-windows-msvc, rustc 1.100.0 (0ef1bc386 2026-11-09). Debug build for tests, release build for smoke. The machine was not idle during the runs (browsers, capture and chat apps were open). - Based on main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 plus one commit, 58eb182e73edd5c3f241bcd2e982ce55cc92d729. - `cargo test --workspace -j 1 --no-fail-fast -- --test-threads=1`: cargo exit 0; 1,436 passed, 0 failed, 47 ignored (37 test binaries). The log has 45 `SKIPPED` lines; those tests pass without running and are not coverage. - Coverage of the 17 names: - `thunk_protocol_with_xcl_objects_on_pc_queues` (existing, edited) covers 3: `XGameUiShowAchievementsAsync`, `XGameUiShowAchievementsResult` and `XGameUiShowWebAuthenticationWithOptionsAsync`. It runs on the PC runtime's queues. - `refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone` (new) covers all 17 through their vtable slots on XCL's own queues. It checks `S_OK` from each Async, one completion callback per call, `XAsyncGetStatus` = `E_NOTIMPL`, every Result = `E_NOTIMPL`, untouched output buffers, `E_INVALIDARG` for a never-started block and for a null block. - Mutation check: a handler completing with `S_OK`, and a missing `WithOptions` registration, each made the new test fail; both were reverted. - Cleanup of a failed block's payload is covered by the existing `errors_propagate_and_release_active_state`, not by the new test. **Regression run** Same game folder, 60 seconds, same title for both. `main` first: xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 5060 Ti title: TestGame seconds: 60 exit: 0x0 frames shown: 1483 (PresentX 1483) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16027 MB This change: xcl-smoke v1 commit: 58eb182e73edd5c3f241bcd2e982ce55cc92d729 gpu: NVIDIA GeForce RTX 5060 Ti title: TestGame seconds: 60 exit: 0x0 frames shown: 1329 (PresentX 1329) presents per 2 s (last 3): 60 60 59 device removals: 0 crashes: 0 peak commit: 16229 MB **Not tested** - Whether the title in the smoke runs called any of the 17 functions; the blocks don't show it. - How a real title reacts to `E_NOTIMPL` (it may treat it as fatal rather than as a dismissed dialog). - Behaviour of the 14 other names on the PC runtime's queues (only 3 are covered there). - A duplicate completion callback arriving more than 20 ms after the first would not be seen. - AMD / RDNA4 and other NVIDIA models. - Out of scope and unchanged: `XGameUiSet*UIResponse` and `XGameUISetUICallbacks` (not in the generated GDK table), `XGameProtocol*`. - Duplicate-PR search: `gh pr list --state all --search "XGameUi"` (5 results) and `"E_NOTIMPL"` (29 results, first 20 listed). I checked #2623, #1610, #12, #24, #270 and #1537: none registers handlers for these XGameUi functions. #24 (merged) added the test assertion this PR changes. #2623, #1610, #270 and #1537 edit `api.rs` and may need a rebase. **AI use** Claude Code, model: not recorded. It wrote the handlers, the tests and a draft of this description, read the function signatures from the public GDK reference, and ran the build and test commands. timesecay reviewed the diff and is the author.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 12:20:04 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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