Qt: Fix rendering at unthrottled framerate while paused

This commit is contained in:
Connor McLaughlin 2022-07-23 00:39:58 +10:00
parent 667726bbb3
commit 68121c0f6b
2 changed files with 5 additions and 5 deletions

View file

@ -700,7 +700,7 @@ void EmuThread::onDisplayWindowResized(int width, int height)
System::HostDisplayResized(); System::HostDisplayResized();
// re-render the display, since otherwise it will be out of date and stretched if paused // re-render the display, since otherwise it will be out of date and stretched if paused
if (!System::IsShutdown()) if (System::IsValid())
{ {
if (m_is_exclusive_fullscreen && !g_host_display->IsFullscreen()) if (m_is_exclusive_fullscreen && !g_host_display->IsFullscreen())
{ {
@ -712,7 +712,7 @@ void EmuThread::onDisplayWindowResized(int width, int height)
} }
// force redraw if we're paused // force redraw if we're paused
if (!FullscreenUI::IsInitialized()) if (!System::IsRunning() && !FullscreenUI::HasActiveWindow())
renderDisplay(); renderDisplay();
} }
} }
@ -1498,7 +1498,7 @@ void EmuThread::run()
CommonHost::PumpMessagesOnCPUThread(); CommonHost::PumpMessagesOnCPUThread();
// we want to keep rendering the UI when paused and fullscreen UI is enabled // we want to keep rendering the UI when paused and fullscreen UI is enabled
if (!FullscreenUI::IsInitialized() && !System::IsValid()) if (!FullscreenUI::HasActiveWindow() && !System::IsRunning())
{ {
// wait until we have a system before running // wait until we have a system before running
m_event_loop->exec(); m_event_loop->exec();

View file

@ -454,8 +454,8 @@ bool FullscreenUI::IsInitialized()
bool FullscreenUI::HasActiveWindow() bool FullscreenUI::HasActiveWindow()
{ {
return s_current_main_window != MainWindowType::None || s_save_state_selector_open || return s_initialized && (s_current_main_window != MainWindowType::None || s_save_state_selector_open ||
ImGuiFullscreen::IsChoiceDialogOpen() || ImGuiFullscreen::IsFileSelectorOpen(); ImGuiFullscreen::IsChoiceDialogOpen() || ImGuiFullscreen::IsFileSelectorOpen());
} }
void FullscreenUI::UpdateForcedVsync(bool should_force) void FullscreenUI::UpdateForcedVsync(bool should_force)