Repository navigation
RT-XAPPCAPTURE: serve XAppCaptureImpl in the xgameruntime shim - the exe's last unserved thunk - #537
tengotengo wants to merge 2 commits into
Conversation
|
Review of head df1800d (read-only; Linux, Python 3, no Windows/MSVC). What ran:
Checked against the repository:
Points to consider:
Not tested: the C++ test on Windows, and the retail executable's actual call (needs game files). Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account. |
|
Thanks - both points addressed in d323506 (docs-only):
One more thing while we are here: #401 also serves XAppCaptureImpl (in xgameruntime_offline.cpp, TakeScreenshot -> ERROR_NOT_SUPPORTED) and updates the same xgameruntime_test.cpp / test_gdk_runtime_calls.py / docs/runtime_imports.md. If both merge, class a4f1aee2-4bf1-4485-b008-a7c26d52ac27 is served by two objects, and the shared files conflict on the second merge. I commented on #401 to coordinate: this PR's layout was measured against the retail executable (the class id, the v4 interface id it requests, and slot 5 - the executable's one thunk of the class), so I would keep #537 as the serving side. |
…lifecycle shim (#401 review) - Speech is consistent now: XSpeechSynthesizerEnumerateInstalledVoices calls back once with a silent voice (XSpeechSynthesizerVoiceInformation in the GDK reference's layout), and SetCustomVoice accepts that voice id only. The enumeration takes (context, callback), the GDK reference's order; main read them the other way round. - XAppCaptureImpl is left to #537, which serves it in xgameruntime.cpp with its full layout. - The lifecycle shim (app-state callbacks, CreateWindowEx hook) moves to its own pull request. - docs/runtime_imports.md: the speech and launcher bullets match the code; the launcher's display power request is called out as a side effect on the host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re-review of head What I re-checked:
Earlier remarks:
Overlap with #401, as of now:
Still open in this PR's docs ( AI-assisted. |
… unserved thunk The retail executable queries the class a4f1aee2 (IXAppCaptureImpl .. 4, from tools/gdk_runtime_classes.json) for IXAppCaptureImpl4 and calls slot 5, XAppCaptureTakeScreenshot - its one xgameruntime reference this file used to refuse with kClassNotProvided. Serve the class with the full 18- slot layout, every method E_NOTIMPL (no console capture or record offline), the v2/v3/v4 interface ids answered alongside the class id, and kAppCaptureClassId renamed to kAppCaptureClass so gdk_runtime_calls.py counts the class as served. With it, every thunk the executable references is served (161 thunks / 158 referenced / 17 classes, zero unserved). xgameruntime_test gains the positive checks (object, slot 5 refusal, bogus interface id); test_gdk_runtime_calls.py's served-class assertion and docs/runtime_imports.md's state notes follow.
…n (XAppCapture offline E_NOTIMPL availability)
|
Rebased onto a289278 (post-#401 main) and re-verified; the branch is ready at 2581f6d but the force-push is momentarily held by our token missing the Re-verified after the rebase: xgameruntime_test under Wine 11.21 — all 161 checks pass (incl. slot-5 refusal + class-id/v4-interface checks); tests/test_gdk_runtime_calls.py 23/23; 12/12 test_docs; full ctest failure set under Wine identical with vs without the change (22/301, the documented headless-Wine environment failures); check_no_game_data clean. gdk_runtime_calls.py on the exe: 158/158 referenced thunks served, none unserved. Pushing the moment the token gains the scope — no other changes needed. |
d323506 to
2581f6d
Compare
|
Reopened with the rebase pushed — head is now 2581f6d (on main a289278, and our four touched files are unchanged on main up to the current tip). The only content change vs d323506 is the rewritten final paragraph of docs/runtime_imports.md (per the 14:48Z review): XAppCaptureImpl served by this change via g_app_capture; XAccessibilityImpl/XLauncherImpl served in xgameruntime_offline.cpp by merged #401 (05318a3). Verification re-run after the rebase: xgameruntime_test under Wine — 161/161; tests/test_gdk_runtime_calls.py 23/23; 12/12 test_docs; ctest failure set identical with vs without the change (22/301, documented headless-Wine environment failures); check_no_game_data clean. |
…lifecycle shim (ProjectLeonida#401 review) - Speech is consistent now: XSpeechSynthesizerEnumerateInstalledVoices calls back once with a silent voice (XSpeechSynthesizerVoiceInformation in the GDK reference's layout), and SetCustomVoice accepts that voice id only. The enumeration takes (context, callback), the GDK reference's order; main read them the other way round. - XAppCaptureImpl is left to ProjectLeonida#537, which serves it in xgameruntime.cpp with its full layout. - The lifecycle shim (app-state callbacks, CreateWindowEx hook) moves to its own pull request. - docs/runtime_imports.md: the speech and launcher bullets match the code; the launcher's display power request is called out as a side effect on the host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claimed in the coordination issue as: RT-XAPPCAPTURE (#14)
What and why
The retail executable's one xgameruntime reference this file used to refuse: it queries the class
a4f1aee2-4bf1-4485-b008-a7c26d52ac27forIXAppCaptureImpl4and calls slot 5,XAppCaptureTakeScreenshot(measured ingame_scarlett_master.exe; one thunk).QueryApiImplanswered
kClassNotProvidedfor it, so the call died on a null pointer path andXGameRuntimeIsFeatureAvailable(XAppCapture)reported false.This pull request serves the class from
runtime/shims/xgameruntime.cpp:IXAppCaptureImpl .. 4layout fromtools/gdk_runtime_classes.json(18 slots:IUnknown + Impl's 8 + Impl2's 4 + Impl3's 2 + Impl4's 1). The class id is also
IXAppCaptureImpl's id, and the object answers the class id and the v2/v3/v4 interface ids(the executable requests with the v4 interface id).
E_NOTIMPL(thenet_not_implementedpattern): a title that checks the HRESULT sees unsupported, andXAppCapturein the feature table becomes available, which matches Microsoft documenting itfor Windows.
kAppCaptureClassIdrenamed tokAppCaptureClass, sotools/gdk_runtime_calls.pycounts theclass as served.
With it, every thunk the executable references is served: the tool's report on the exe goes
from
not-served-referenced: XAppCaptureImpl (slot 5)tonot-served=- not-served-referenced=-(161 thunks, 158 referenced, 17 classes).
Tested
Windows cross-build (clang-cl 23.1.4 + xwin SDK 10.0.26100 splat) on a Linux box with an RTX 5060 Ti:
runtime/test/xgameruntime_testunder Wine 11.21: 161 checks, all pass - three new: the objectanswers the class id and the v4 interface id, slot 5 refuses with
E_NOTIMPL, a bogus interfaceid is
E_NOINTERFACE; the feature-availability consistency check now covers XAppCapture=true.ctestunder Wine: 23 failures before and after this change, byte-identical failure set(276/299 pass both ways) - the 23 are the documented headless-Wine environment failures
(presentation without a display, host-D3D12 comparisons, GameInput/SDL3), not regressions.
python3 -I tests/test_gdk_runtime_calls.py: 23 tests OK (the served-class assertion updatedfrom notIn to
kAppCaptureClass).tools/gdk_runtime_calls.pyre-run on the exe: XAppCaptureImpl now "served by the runtime";zero unserved classes.
scripts/check_no_game_data.pyon the changed files: clean.retail package.
AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (not applicable: no translator change)