Repository navigation
xgameruntime: serve XGameUiImpl (offline system dialogs) through QueryApiImpl - #3657
Open
romainveurrier wants to merge 1 commit into
Open
romainveurrier wants to merge 1 commit into
romainveurrier wants to merge 1 commit into
Conversation
…yApiImpl A GDK title links the XGameUi* functions statically (xgameruntime.lib); each thunk asks QueryApiImpl for XGameUiImpl and calls one slot. QueryApiImpl refused the class, so a title reporting a problem through a system dialog (XGameUiShowMessageDialogAsync, XGameUiShowErrorDialogAsync) got "class not provided" instead of an answer. runtime/shims/xgameruntime_ui.cpp serves it, in its own file, hooked into QueryApiImpl with one line: - ids and slot order from xgameruntime-docs (facts only), signatures and enums from the public GDK reference; the class id (not IXGameUiImpl's) and IXGameUiImpl..4 answer with one 51-slot vtable; - message dialogs are printed to the log and answered with their default button; error dialogs are printed and closed; text entry is answered with the title's default text (cut to maxTextLength); - profile card, achievements, invites and state share are shown and closed at once; player picker and web authentication need the network and fail before starting; - unknown slots, in-game text-entry handles and custom-UI callbacks answer E_NOTIMPL (every documented function returns an HRESULT) and log once. xgameruntime_ui_test (26 checks) drives the served slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Code review of a80f07c (AI-assisted), with probe calls added to
Checked and found correct:
Not checked: the |
This was referenced Nov 22, 2026
Contributor
|
Tested a80f07c (merged onto main f847748) on NVIDIA GeForce RTX 4060 Ti, driver 610.88 (32.0.16.1088), Windows 11 26200, MSVC 14.51.36231 (VS 2026), Vulkan SDK 1.4.363.0: pass
AI-assisted (Claude). |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item: new RT item, claimed in #3574 (claim).
Why
A GDK title links the
XGameUi*functions statically (xgameruntime.lib). Each thunk asksQueryApiImplforXGameUiImpland calls one slot with the function's own arguments afterthis, the mechanismdocs/runtime_imports.mdmeasures on the package's DLLs.QueryApiImplrefused the class, so a title that reports a problem through a system dialog (a corrupt save, a lost connection, a confirmation) got "class not provided" instead of an answer.What
runtime/shims/xgameruntime_ui.cpp, in its own file, hooked intoQueryApiImplwith one line, like #3363 (XUserImpl) and #3550 (XStoreImpl). The three PRs touch adjacent lines there, so the later ones need a one-line rebase.XUserImplandXStoreImpl, the class id isn'tIXGameUiImpl's id. The class id (which the thunks pass as the interface id too) andIXGameUiImpl–4all answer with the same 51-slot vtable (3 + 27 + 10 + 2 + 9).E_INVALIDARG.maxTextLength. The reference documents no cancellation code, so none is invented.S_OK).E_INVALIDARG.HRESULT_FROM_WIN32(ERROR_NETWORK_UNREACHABLE), so noXAsyncBlockis left waiting.E_NOTIMPL: the docs' unknown slots, the in-game text-entry handles (IXGameUiImpl2) and the custom-UI callbacks (IXGameUiImpl4), so a title falls back to the system dialogs above. Every documented function here returns an HRESULT, soE_NOTIMPLreads as a failure (noboolslot to misread). Each logs once.Nothing here touches licensing or online services.
Not measured yet: no package DLL calls an
XGameUi*slot, so the slot order rests on xgameruntime-docs until the executable's first boot.docs/runtime_imports.mdsays so.Tests
xgameruntime_ui_test(26 checks) gets the class throughrt::shims::find("xgameruntime.dll", "QueryApiImpl")and calls the served slots with the documented arguments.maxTextLength, no default text, and a buffer too short (on its own call, since xtaskqueue releases a call whose result buffer is too small).E_NOTIMPLslots.Tested
Fedora 44, clang-cl 22.1.8 with xwin (SDK 10.0.26100),
/W4: no warnings in the new files.xgameruntimeandxgameruntime_uipass.device_proxyalso fails onmain;winhttp_offlineis intermittent (HANDLE_CLOSINGtiming) and builds onlywinhttp_offline.cpp+registry.cpp.scripts/build_runtime.ps1's source list includes the new file. Not run: MSVC, native Windows.No game files. AI-assisted (Claude Code).
🤖 Generated with Claude Code