Persist ImGui panel layout to disk; quiet audio set_audio_ring log spam

Layout persistence: re-enable io.IniFilename (was nullptr "for the spike"),
anchored to a coop_layout.ini next to the exe so window positions/sizes survive
restarts even when Steam launches us under the donor appid (CWD is unreliable).
Path is UTF-8 for ImGui's file IO. When a saved layout is restored at startup,
suppress the computed-default force so it does not clobber the user's positions;
Reset layout (and a fresh install with no .ini) still applies the default.

Log spam: the worker thread re-attaches every audio ring every tick (idempotent),
and set_audio_ring logged unconditionally, flooding the log. Only log when the
ring pointer actually changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 11:24:23 +02:00
parent 86905a1f35
commit 22b0dff918
5 changed files with 62 additions and 5 deletions

View File

@@ -43,6 +43,11 @@ void apply_panel_layout(Panel panel);
void request_layout_reset();
void apply_layout_end_frame();
// Tell the layout whether ImGui restored a saved layout (.ini) at startup. When it
// did, the computed default layout must NOT be force-applied on launch (that would
// clobber the user's saved window positions); only an explicit Reset layout re-applies.
void set_layout_persisted(bool had_persisted_layout);
// Rolling frame-timing over a ~1 s window, recomputed each window so the status
// bar can show a stable FPS plus the min/max frame time (jitter) underneath it.
class FrameStats