ImGuiManager: Fix debug window interaction with frame limit off

This commit is contained in:
Connor McLaughlin 2023-01-11 18:42:39 +10:00
parent 8d3250667f
commit d096a09ed8
4 changed files with 20 additions and 6 deletions

View File

@ -786,11 +786,14 @@ void Host::RenderDisplay(bool skip_present)
if (!skip_present) if (!skip_present)
{ {
FullscreenUI::Render(); FullscreenUI::Render();
ImGuiManager::RenderOverlays(); ImGuiManager::RenderTextOverlays();
ImGuiManager::RenderOSD(); ImGuiManager::RenderOSD();
ImGuiManager::RenderDebugWindows();
} }
// Debug windows are always rendered, otherwise mouse input breaks on skip.
ImGuiManager::RenderOverlayWindows();
ImGuiManager::RenderDebugWindows();
g_host_display->Render(skip_present); g_host_display->Render(skip_present);
ImGuiManager::NewFrame(); ImGuiManager::NewFrame();

View File

@ -1450,11 +1450,14 @@ void EmuThread::renderDisplay(bool skip_present)
if (!skip_present) if (!skip_present)
{ {
FullscreenUI::Render(); FullscreenUI::Render();
ImGuiManager::RenderOverlays(); ImGuiManager::RenderTextOverlays();
ImGuiManager::RenderOSD(); ImGuiManager::RenderOSD();
ImGuiManager::RenderDebugWindows();
} }
// Debug windows are always rendered, otherwise mouse input breaks on skip.
ImGuiManager::RenderOverlayWindows();
ImGuiManager::RenderDebugWindows();
g_host_display->Render(skip_present); g_host_display->Render(skip_present);
ImGuiManager::NewFrame(); ImGuiManager::NewFrame();

View File

@ -128,7 +128,7 @@ static std::tuple<float, float> GetMinMax(gsl::span<const float> values)
static bool s_save_state_selector_ui_open = false; static bool s_save_state_selector_ui_open = false;
void ImGuiManager::RenderOverlays() void ImGuiManager::RenderTextOverlays()
{ {
const System::State state = System::GetState(); const System::State state = System::GetState();
if (state != System::State::Shutdown) if (state != System::State::Shutdown)
@ -140,7 +140,14 @@ void ImGuiManager::RenderOverlays()
if (g_settings.display_show_inputs && state != System::State::Paused) if (g_settings.display_show_inputs && state != System::State::Paused)
DrawInputsOverlay(); DrawInputsOverlay();
}
}
void ImGuiManager::RenderOverlayWindows()
{
const System::State state = System::GetState();
if (state != System::State::Shutdown)
{
if (s_save_state_selector_ui_open) if (s_save_state_selector_ui_open)
SaveStateSelectorUI::Draw(); SaveStateSelectorUI::Draw();
} }

View File

@ -6,7 +6,8 @@
#include "imgui_manager.h" #include "imgui_manager.h"
namespace ImGuiManager { namespace ImGuiManager {
void RenderOverlays(); void RenderTextOverlays();
void RenderOverlayWindows();
} }
namespace SaveStateSelectorUI { namespace SaveStateSelectorUI {