diff --git a/src/core/mdec.cpp b/src/core/mdec.cpp index a390c6e93..15d16ed8b 100644 --- a/src/core/mdec.cpp +++ b/src/core/mdec.cpp @@ -722,18 +722,10 @@ void MDEC::HandleSetScaleCommand() std::memcpy(m_scale_table.data(), packed_data.data(), m_scale_table.size() * sizeof(s16)); } -void MDEC::DrawDebugMenu() +void MDEC::DrawDebugStateWindow() { - ImGui::MenuItem("MDEC", nullptr, &m_show_state); -} - -void MDEC::DrawDebugWindow() -{ - if (!m_show_state) - return; - ImGui::SetNextWindowSize(ImVec2(300, 350), ImGuiCond_FirstUseEver); - if (!ImGui::Begin("MDEC State", &m_show_state)) + if (!ImGui::Begin("MDEC State", &m_system->GetSettings().debugging.show_mdec_state)) { ImGui::End(); return; diff --git a/src/core/mdec.h b/src/core/mdec.h index 0039774f4..c01510b40 100644 --- a/src/core/mdec.h +++ b/src/core/mdec.h @@ -28,8 +28,7 @@ public: void Execute(TickCount ticks); - void DrawDebugMenu(); - void DrawDebugWindow(); + void DrawDebugStateWindow(); private: static constexpr u32 DATA_IN_FIFO_SIZE = 256 * 4; @@ -142,6 +141,5 @@ private: TickCount m_block_copy_out_ticks = TICKS_PER_BLOCK; bool m_block_copy_out_pending = false; - bool m_show_state = false; u32 m_total_blocks_decoded = 0; }; diff --git a/src/duckstation/sdl_interface.cpp b/src/duckstation/sdl_interface.cpp index df1e40cf4..24aff8f53 100644 --- a/src/duckstation/sdl_interface.cpp +++ b/src/duckstation/sdl_interface.cpp @@ -1018,6 +1018,8 @@ void SDLInterface::DrawDebugWindows() m_system->GetTimers()->DrawDebugStateWindow(); if (debug_settings.show_spu_state) m_system->GetSPU()->DrawDebugStateWindow(); + if (debug_settings.show_mdec_state) + m_system->GetMDEC()->DrawDebugStateWindow(); } void SDLInterface::AddOSDMessage(const char* message, float duration /*= 2.0f*/)