Add per-backend input debug visualization + round-trip view

Makes it possible to isolate an input->tool problem from a tool->game one in the
Controllers panel (under Debug details):
- which backend fed each slot is already shown via the per-pad source tag
  ("XInput #0" / "Steam Input") in the Incoming section;
- a new "Round-trip" table shows, per slot, the state we forwarded (the active
  backend's pad) next to what the game actually read back, highlighting matches.

For the round-trip, the XInput hook now echoes the state it returns to the game into
the status (protocol v9->v10: per-slot read_state in HookStatus).

Verified: hook_selftest (x64 + x86) asserts the hook records the game-read state;
full build x64 + x86 clean; ctest x64 9/9, x86 3/3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 05:15:07 +02:00
parent 056a478e19
commit 327ba1f394
8 changed files with 57 additions and 10 deletions

View File

@@ -76,15 +76,6 @@ is removed from this list once done — so the top item is always next. The
self-verifiable tooling / UI / input items come first; the game-pipeline items that
need a real game (and Remote Play) to fully validate come last.
- **Per-backend input debug visualization.** To separate "wrong input *into* the
tool" from "wrong input *out to* the game", show three distinct views in the
Controllers panel (under Debug details): (a) **received via XInput** (raw
`XInputSource` state), (b) **received via Steam Input** (raw `SteamInputSource`
action values) — so it's obvious which backend delivered what — and (c)
**forwarded to the game** (the `PadInfo` we write to shared memory, alongside what
the game actually read back via the hook's per-slot channel). The hook already
reports per-slot poll counts; extend it to echo the last state the game read so (c)
is a true round-trip.
- **Release the mouse cursor for cursor-clipping games.** Games that confine the
cursor while focused (e.g. Trails through Daybreak via `ClipCursor` / per-frame
`SetCursorPos` re-centering) trap the operator's mouse permanently, because the