Skip to content

xgameruntime_user: the gamer picture, token and sign-out calls complete their async block with the same results - #8587

Open
tedin7 wants to merge 3 commits into
ItsNotRexed:mainfrom
tedin7:c2-xuser-gamerpicture-token-signout
Open

tedin7 wants to merge 3 commits into
ItsNotRexed:mainfrom
tedin7:c2-xuser-gamerpicture-token-signout

Conversation

@tedin7

@tedin7 tedin7 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Complete offline gamer picture, token, MSA token and sign-out calls asynchronously, including their callbacks and result statuses. Sign-out is a no-op for the offline profile; existing handles continue to report SignedIn offline (known limit). Result and ResultSize calls reject successful unrelated blocks without consuming their payload. A completed zero-payload privilege resolution cannot be distinguished from sign-out by its result getter.

Why

These calls previously failed synchronously and never invoked the completion callback. Microsoft documents sign-out as platform-dependent; it does not require failure for an offline profile.

Tested

  • AI-assisted change. On p2, xgameruntime_user_test: negative control 8/96 checks failed before the fix; 0/96 failed after it. No GPU or driver was used.
  • python -I scripts/check_no_game_data.py runtime/shims/xgameruntime_user.cpp runtime/test/xgameruntime_user_test.cpp
  • git diff --check

@ItsNotRexed: an exe PR, as you asked.

Claim: #8344 (comment)

@MartinIndra02

Copy link
Copy Markdown

Independent build + test: PASS

AI-assisted (Claude Code). Windows 11 x64, MSVC 19.44.35220, Ninja RelWithDebInfo. GPU (not used): NVIDIA GeForce RTX 3080 driver 621.24 / 32.0.16.2124.

Head 90556a9c5, merged locally with current main 867d922f0 (clean merge). Built xgameruntime_user_test and gta6rt.

Test PR (merged) runtime/shims/xgameruntime_user.cpp reverted to main
xgameruntime_user_test.exe exit 0, 0 of 79 checks failed exit 1, 10 of 57 checks failed, e.g. FAIL offline async starts with S_OK, FAIL offline async invokes callback once

I checked the new slot signatures against the public GDK declarations, with the async block last: XUserGetGamerPictureAsync(user, size, async), XUserGetTokenAndSignature[Utf16]Async(user, options, method, url, headerCount, headers, bodySize, body, async), XUserGetMsaTokenSilentlyAsync(user, options, scope, async) and XUserSignOutAsync(user, async). All match, so the async block is read from the right argument.

Note: as the description says, XUserSignOutAsync completes with S_OK, but the handle still reports SignedIn afterwards. A title that waits for a state change after signing out won't see one. No issues found.

FYI: #8673 and #8422 also change xgameruntime_user.cpp.

@RAINighty

Copy link
Copy Markdown

Tested 90556a9c5 merged with main 867d922f0 (clean merge) on Windows 11 (10.0.26300), Intel Core i7-14650HX, MSVC 19.44.35228, RelWithDebInfo (Ninja), CPU-only tests: pass.

  • xgameruntime_user, xgameruntime_user_gamertag and xgameruntime_user_gamertag_long pass with this PR (3 of 3).
  • Negative control: this PR's tests with main's runtime/shims/xgameruntime_user.cpp: all three fail (0 of 3), so the new checks do catch the change.
  • Code not reviewed beyond running it. No GPU or game files.

AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants