From a55412c24ab3fa08ee44b82b021a8e0a3ca38925 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 11 Oct 2019 17:48:34 +1000 Subject: [PATCH] SPU: Hide debug window by default --- src/core/spu.cpp | 11 ++++++----- src/core/spu.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/spu.cpp b/src/core/spu.cpp index 60dcac137..b45f13c22 100644 --- a/src/core/spu.cpp +++ b/src/core/spu.cpp @@ -743,7 +743,7 @@ std::tuple SPU::SampleVoice(u32 voice_inde if (voice.current_block_flags.loop_start) { - Log_DebugPrintf("Voice %u loop start @ 0x%08X", voice_index, ZeroExtend32(voice.current_address)); + Log_TracePrintf("Voice %u loop start @ 0x%08X", voice_index, ZeroExtend32(voice.current_address)); voice.regs.adpcm_repeat_address = voice.current_address; } } @@ -764,13 +764,13 @@ std::tuple SPU::SampleVoice(u32 voice_inde { if (!voice.current_block_flags.loop_repeat) { - Log_DebugPrintf("Voice %u loop end+mute @ 0x%08X", voice_index, ZeroExtend32(voice.current_address)); + Log_TracePrintf("Voice %u loop end+mute @ 0x%08X", voice_index, ZeroExtend32(voice.current_address)); m_endx_register |= (u32(1) << voice_index); voice.KeyOff(); } else { - Log_DebugPrintf("Voice %u loop end+repeat @ 0x%08X", voice_index, ZeroExtend32(voice.current_address)); + Log_TracePrintf("Voice %u loop end+repeat @ 0x%08X", voice_index, ZeroExtend32(voice.current_address)); voice.current_address = voice.regs.adpcm_repeat_address; } } @@ -829,11 +829,11 @@ void SPU::GenerateSample() void SPU::DrawDebugWindow() { - if (!m_debug_window_open) + if (!m_show_spu_state) return; ImGui::SetNextWindowSize(ImVec2(800, 400), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("SPU State", &m_debug_window_open)) + if (!ImGui::Begin("SPU State", &m_show_spu_state)) { ImGui::End(); return; @@ -897,4 +897,5 @@ void SPU::DrawDebugWindow() void SPU::DrawDebugMenu() { // TODO: Show RAM, etc. + ImGui::MenuItem("Show State", nullptr, &m_show_spu_state); } diff --git a/src/core/spu.h b/src/core/spu.h index edb046fb6..32e62134e 100644 --- a/src/core/spu.h +++ b/src/core/spu.h @@ -258,7 +258,7 @@ private: DMA* m_dma = nullptr; InterruptController* m_interrupt_controller = nullptr; AudioStream* m_audio_stream = nullptr; - bool m_debug_window_open = true; + bool m_show_spu_state = false; SPUCNT m_SPUCNT = {}; SPUSTAT m_SPUSTAT = {};