From 86905a1f35f658206176831cc032392af101bc97 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sun, 21 Jun 2026 11:05:52 +0200 Subject: [PATCH] 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 --- README.md | 10 ++++++++++ host/src/ui/app_chrome.cpp | 11 ++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2cdd3b5..8b1fe39 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,16 @@ for what's left. readable image. Use WGC in the meantime. - **D3D9 hooked path.** Covered by WGC today; a dedicated `IDirect3DDevice9::Present` 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 diff --git a/host/src/ui/app_chrome.cpp b/host/src/ui/app_chrome.cpp index 5f8452a..a43cf89 100644 --- a/host/src/ui/app_chrome.cpp +++ b/host/src/ui/app_chrome.cpp @@ -54,12 +54,13 @@ void apply_panel_layout(Panel panel) const float top = o.y + 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 - // a touch taller for its graphs), so Audio no longer hogs the column. + // Center column stacks Controllers / Video / Audio. Controllers has the most + // 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 ctrl_h = stack_avail * 0.30f; - const float vid_h = stack_avail * 0.38f; - const float audio_h = stack_avail * 0.32f; + const float ctrl_h = stack_avail * 0.45f; + const float vid_h = stack_avail * 0.32f; + const float audio_h = stack_avail * 0.23f; ImVec2 pos, size; switch (panel)