SPU: Hide debug window by default

This commit is contained in:
Connor McLaughlin 2019-10-11 17:48:34 +10:00
parent 25209c3d58
commit a55412c24a
2 changed files with 7 additions and 6 deletions

View file

@ -743,7 +743,7 @@ std::tuple<SPU::SampleFormat, SPU::SampleFormat> 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::SampleFormat, SPU::SampleFormat> 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);
}

View file

@ -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 = {};