MDEC: Fix broken stats window

This commit is contained in:
Connor McLaughlin 2019-10-26 13:31:21 +10:00
parent 540e942a46
commit ed6d0e34de
3 changed files with 5 additions and 13 deletions

View File

@ -722,18 +722,10 @@ void MDEC::HandleSetScaleCommand()
std::memcpy(m_scale_table.data(), packed_data.data(), m_scale_table.size() * sizeof(s16)); 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); 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(); ImGui::End();
return; return;

View File

@ -28,8 +28,7 @@ public:
void Execute(TickCount ticks); void Execute(TickCount ticks);
void DrawDebugMenu(); void DrawDebugStateWindow();
void DrawDebugWindow();
private: private:
static constexpr u32 DATA_IN_FIFO_SIZE = 256 * 4; static constexpr u32 DATA_IN_FIFO_SIZE = 256 * 4;
@ -142,6 +141,5 @@ private:
TickCount m_block_copy_out_ticks = TICKS_PER_BLOCK; TickCount m_block_copy_out_ticks = TICKS_PER_BLOCK;
bool m_block_copy_out_pending = false; bool m_block_copy_out_pending = false;
bool m_show_state = false;
u32 m_total_blocks_decoded = 0; u32 m_total_blocks_decoded = 0;
}; };

View File

@ -1018,6 +1018,8 @@ void SDLInterface::DrawDebugWindows()
m_system->GetTimers()->DrawDebugStateWindow(); m_system->GetTimers()->DrawDebugStateWindow();
if (debug_settings.show_spu_state) if (debug_settings.show_spu_state)
m_system->GetSPU()->DrawDebugStateWindow(); m_system->GetSPU()->DrawDebugStateWindow();
if (debug_settings.show_mdec_state)
m_system->GetMDEC()->DrawDebugStateWindow();
} }
void SDLInterface::AddOSDMessage(const char* message, float duration /*= 2.0f*/) void SDLInterface::AddOSDMessage(const char* message, float duration /*= 2.0f*/)