Injection: session-only auto re-attach on relaunch

Add an "Auto re-attach this game on relaunch" checkbox (default off, never
persisted, shown while attached or terminated). While on and the target has
terminated, the host polls the process list for the same image name and
re-injects the moment it reappears -- built on the existing
re-attach-by-image-name path, so there's no target to pick. The kill+relaunch
recovery for a wrong audio format: re-attaching early catches
IAudioClient::Initialize and reads the exact format.

Validated live (harness): inject coop_tone -> kill -> relaunch -> auto
re-injected into the new pid, and early enough that the format came back as
Exact. Trim README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 02:03:13 +02:00
parent 32028cb286
commit b00b516cdb
4 changed files with 59 additions and 9 deletions

View File

@@ -92,15 +92,6 @@ and covers anything the hooked path doesn't (Vulkan, D3D9 — see Roadmap).
### Planned (next up)
- **Auto re-attach the same game on relaunch (session-only).** A checkbox on the
attached (or just-terminated) target, default off, *not* persisted, **always visible**
(it's the recommended recovery path, not a diagnostic). While on and the target has
terminated, the host watches the process list for the same image name and injects the
moment it reappears — built on the existing re-attach-by-image-name path, so there's no
target to type. Workflow: if audio came out wrong (late attach forced the guess), tick
the box, kill and relaunch the game, and the host re-attaches *early* — early enough to
catch `IAudioClient::Initialize` and read the exact format. A dependable fallback, not
the intended primary path (hardened first-launch detection should get it right anyway).
- **Mock game + stress-test suite.** A bare-bones test game that renders an animated
(non-static) pattern — so dropped/duplicated/torn frames are obvious — with a
selectable graphics backend (DX11/DX12 now; structured to add OpenGL/Vulkan) and a