M1: UI-fit instrumentation + headless ui_fit_test + first overflow fixes
Add panel overflow instrumentation (record_panel_fit reading ImGui ScrollMax), a forced layout-reference + debug-aware center split, and host harness commands (uisize/uifit). New headless ui_fit_test drives the real Controllers + Audio panels at reference resolutions with Debug details on and asserts no panel overflows its assigned size; the Audio panel gains a demo mode so its richest content renders without a live mirror. Fixes from the measured overflow: widen the center column (was too narrow -> horizontal overflow), merge the Controllers poll/round-trip tables and fold the trigger line into the slot line, and make the center height split Debug-details-aware (Video's height is mirroring-driven, not debug-driven, so a static split can't serve both modes). Controllers + Audio now fit at 1920x1080 with max info. Video/Injection/Log fit is finalized at the end via the live uifit harness (M1 stays open until then). 15/15 ctest. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,15 @@ public:
|
||||
// `debug_details` on, the per-stream table is shown.
|
||||
void draw_ui(const HookStatusView& status, bool debug_details);
|
||||
|
||||
// UI-fit check (headless test) only: render the richest content path -- as if a
|
||||
// loopback mirror were running with long status/reason strings -- without a live
|
||||
// AudioMirror, so the fit test can measure the panel's worst-case size. Never set in
|
||||
// the shipping host (the render path is identical, just fed synthetic values).
|
||||
void dev_set_demo(bool on)
|
||||
{
|
||||
demo_ = on;
|
||||
}
|
||||
|
||||
#ifdef COOP_TEST_HARNESS
|
||||
// Test-harness hooks (debug builds only): drive the real audio code paths and read
|
||||
// state back, incl. targeting a windowless process by pid (coop_tone has no window).
|
||||
@@ -89,6 +98,7 @@ private:
|
||||
HWND target_ = nullptr;
|
||||
DWORD dev_pid_ = 0; // test harness only: force a (windowless) target pid; 0 in production
|
||||
bool enabled_ = false;
|
||||
bool demo_ = false; // UI-fit test only: render the richest content with synthetic values
|
||||
AudioMirror mirror_;
|
||||
|
||||
// Per-game persisted overrides + per-target session bookkeeping.
|
||||
|
||||
Reference in New Issue
Block a user