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

@@ -1,6 +1,8 @@
// Owns ImGui setup/teardown for the Win32 + DX11 backends.
#pragma once
#include <string>
#include <d3d11.h>
#include <windows.h>
@@ -22,6 +24,9 @@ public:
private:
bool initialized_ = false;
// Backing storage for io.IniFilename (ImGui keeps the pointer, not a copy), so the
// layout .ini path must outlive the context. Empty until init() sets it.
std::string ini_path_;
};
} // namespace coop