From 8f314c8d493e9128f4cb57cd29a667d2c23bccdb Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 5 Aug 2022 17:09:44 +1000 Subject: [PATCH] System: Fix vsync resetting on pause and fast forward on boot --- src/core/system.cpp | 3 +++ src/frontend-common/fullscreen_ui.cpp | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/system.cpp b/src/core/system.cpp index e038c4c28..3b4a54fc2 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -931,6 +931,7 @@ void System::PauseSystem(bool paused) else { Host::OnSystemResumed(); + g_host_display->SetVSync(ShouldUseVSync()); ResetPerformanceCounters(); ResetThrottler(); } @@ -1252,6 +1253,8 @@ bool System::Initialize(bool force_software_renderer) s_throttle_frequency = 60.0f; s_frame_period = 0; s_next_frame_time = 0; + m_turbo_enabled = false; + m_fast_forward_enabled = false; s_average_frame_time_accumulator = 0.0f; s_worst_frame_time_accumulator = 0.0f; diff --git a/src/frontend-common/fullscreen_ui.cpp b/src/frontend-common/fullscreen_ui.cpp index 691adeb03..36f41b1db 100644 --- a/src/frontend-common/fullscreen_ui.cpp +++ b/src/frontend-common/fullscreen_ui.cpp @@ -475,10 +475,7 @@ void FullscreenUI::OnSystemPaused() void FullscreenUI::OnSystemResumed() { - if (!IsInitialized()) - return; - - g_host_display->SetVSync(System::ShouldUseVSync()); + // noop } void FullscreenUI::OnSystemDestroyed()