M2(Vulkan): too-late detection + red relaunch banner on the mirror window

The hook reports vk_too_late when vulkan-1.dll is loaded and the GPA hook has
been in for >4s but it never caught the app creating its device -- i.e. the app
resolved its Vulkan functions before we hooked (injected too late). Surfaced
through a new HookStatus.vk_too_late field (protocol 15->16) and shown by the
host as a red banner on the mirror window: "Detected a Vulkan game, but the
mirror hook attached too late... enable Auto re-attach (and Set up Vulkan layer
if it persists) and relaunch." WGC keeps mirroring meanwhile.

mock_game_test gains a too-late detection check (late-inject a Vulkan game ->
vk_too_late trips). Verified live: the banner shows over the running tool when a
Vulkan game is injected late with the video subsystem on (added a debug-harness
`video on/off` command to drive it). 15/15 ctest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 12:51:34 +02:00
parent dd976979a1
commit 894285459c
8 changed files with 124 additions and 5 deletions

View File

@@ -227,6 +227,7 @@ DWORD WINAPI worker_thread(LPVOID)
coop::hook::update_input_diagnostics(g_ipc); // refreshes each tick; registrations can change
coop::hook::release_cursor_tick(); // free the operator's mouse if requested (no-op otherwise)
coop::hook::hook_publish(g_ipc); // installed-hooks list + call counts
g_ipc.set_vk_too_late(coop::hook::vk_injected_too_late()); // Vulkan attached-too-late banner
g_ipc.heartbeat();
// Reconcile ~4x/s, but drain MKB events far more often (input must be