Generalize UI: general status by default, diagnostics behind Debug details
Rework the spike-era debug readouts into general-purpose status, with the verbose diagnostics gated behind the menu bar's "Debug details" switch: - Controllers (was "Phase 0 spike"): always shows slot/source + live buttons; the raw stick/trigger numbers are debug-only. - Injection hook status: general view is attached + focus spoof + a single "Game reading controller: N polls/s" summary; the per-slot poll table, focus-API counts, and input-path detection are debug-only. - Audio: general view adds a "Buffered: N ms" health/latency proxy (AudioMirror now tracks buffered audio in both render paths) and keeps the render-stream count; the per-stream table is debug-only. Default overlay is now clean general status; flip Debug details for the full diagnostics. Completes the "generalize the UI" roadmap task. All tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,7 @@ void AudioMirror::stop()
|
||||
audio_ring_shm_.reset();
|
||||
running_.store(false, std::memory_order_release);
|
||||
source_.store(Source::None, std::memory_order_relaxed);
|
||||
buffered_ms_.store(0, std::memory_order_relaxed);
|
||||
pid_ = 0;
|
||||
}
|
||||
|
||||
@@ -380,6 +381,8 @@ bool AudioMirror::run_hooked(AudioRingHeader* ring)
|
||||
}
|
||||
const UINT32 avail = render_frames - padding;
|
||||
const std::uint32_t ring_bytes = audio_ring_available(*ring);
|
||||
buffered_ms_.store(static_cast<unsigned>(ring_bytes / frame_bytes * 1000 / rate),
|
||||
std::memory_order_relaxed);
|
||||
if (!primed && ring_bytes >= prime_bytes)
|
||||
{
|
||||
primed = true;
|
||||
@@ -571,6 +574,9 @@ void AudioMirror::run_loopback(DWORD pid)
|
||||
continue;
|
||||
}
|
||||
const UINT32 avail = render_frames - padding;
|
||||
buffered_ms_.store(
|
||||
static_cast<unsigned>(ring.available() / frame_bytes * 1000 / fmt->nSamplesPerSec),
|
||||
std::memory_order_relaxed);
|
||||
if (!primed && ring.available() >= prime_bytes)
|
||||
{
|
||||
primed = true;
|
||||
|
||||
Reference in New Issue
Block a user