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:
@@ -61,6 +61,13 @@ public:
|
||||
return channels_.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
// Audio currently buffered between capture and the output device, in ms — a
|
||||
// health/latency proxy (rises if the consumer can't keep up). 0 when stopped.
|
||||
[[nodiscard]] unsigned buffered_ms() const
|
||||
{
|
||||
return buffered_ms_.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
// Which capture path is active, for the UI's source indicator.
|
||||
enum class Source
|
||||
{
|
||||
@@ -107,6 +114,7 @@ private:
|
||||
std::atomic<Source> source_{Source::None};
|
||||
std::atomic<unsigned> sample_rate_{0};
|
||||
std::atomic<unsigned> channels_{0};
|
||||
std::atomic<unsigned> buffered_ms_{0};
|
||||
|
||||
mutable std::mutex status_mutex_;
|
||||
std::string status_;
|
||||
|
||||
Reference in New Issue
Block a user