Tune center-column heights; note RawInput/DirectInput MKB + DX12 cost as future work

- Center stack heights set to Controllers 45% / Video 32% / Audio 23% (measured from
  the operator's preferred layout): Controllers has the most content, Audio the least.
- Future work: MKB forwarding for Raw Input / DirectInput games (the message +
  polling-state path doesn't reach them -- e.g. Trails through Daybreak uses Raw
  Input), and reducing the D3D11On12 (DX12) per-frame capture overhead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 11:05:52 +02:00
parent 1493ce08e5
commit 86905a1f35
2 changed files with 16 additions and 5 deletions

View File

@@ -86,6 +86,16 @@ for what's left.
readable image. Use WGC in the meantime. readable image. Use WGC in the meantime.
- **D3D9 hooked path.** Covered by WGC today; a dedicated `IDirect3DDevice9::Present` - **D3D9 hooked path.** Covered by WGC today; a dedicated `IDirect3DDevice9::Present`
hook would be the lower-latency upgrade. hook would be the lower-latency upgrade.
- **Mouse + keyboard forwarding for Raw Input / DirectInput games.** The MKB
subsystem forwards via window messages (`PostMessage`) plus synthesized
`GetAsyncKeyState` / `GetKeyboardState` / `GetCursorPos`, which covers message-loop
and polling games. Games that read keyboard/mouse via **Raw Input** (`WM_INPUT` /
`GetRawInputData`, e.g. Trails through Daybreak) or **DirectInput**
(`IDirectInputDevice8::GetDeviceState/GetDeviceData`) don't see it. Add hooks for
those paths to synthesize the forwarded input there too.
- **DX12 hooked-capture overhead.** The D3D11On12 bridge mirrors D3D12 games but is
noticeably heavier than the native D3D11 path (see Lessons learned); reducing its
per-frame cost (cache wrapped resources, lighter sync) is a follow-up.
## Building ## Building

View File

@@ -54,12 +54,13 @@ void apply_panel_layout(Panel panel)
const float top = o.y + m; const float top = o.y + m;
const float full_h = std::max(200.0f, s.y - 2.0f * m); const float full_h = std::max(200.0f, s.y - 2.0f * m);
// Center column stacks Controllers / Video / Audio at roughly even heights (Video // Center column stacks Controllers / Video / Audio. Controllers has the most
// a touch taller for its graphs), so Audio no longer hogs the column. // content (incoming pads + poll + round-trip tables) so it gets the most height;
// Audio the least (proportions measured from the operator's preferred layout).
const float stack_avail = std::max(150.0f, full_h - 2.0f * gap); const float stack_avail = std::max(150.0f, full_h - 2.0f * gap);
const float ctrl_h = stack_avail * 0.30f; const float ctrl_h = stack_avail * 0.45f;
const float vid_h = stack_avail * 0.38f; const float vid_h = stack_avail * 0.32f;
const float audio_h = stack_avail * 0.32f; const float audio_h = stack_avail * 0.23f;
ImVec2 pos, size; ImVec2 pos, size;
switch (panel) switch (panel)