From 056cbbcdcdab063f0cac71e7c5dc4991fdcafddf Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Thu, 24 Aug 2017 00:00:14 +0100 Subject: [PATCH] pcsx2: Fix inconsistent framelimiter/vsync interaction If emulation is paused and resumed, vsync may become enabled even if the frame limiter is currently disabled. This state persists until the settings are changed or the hotkeys are used. Fix the inconsistent framelimiter/vsync behaviour so that vsync isn't enabled whenever the framelimiter is disabled, which matches the behaviour in the rest of the code. --- pcsx2/Pcsx2Config.cpp | 2 +- pcsx2/gui/AppCoreThread.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index 77397813e7..7cc5ab6cbb 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -237,7 +237,7 @@ void Pcsx2Config::GSOptions::LoadSave( IniInterface& ini ) int Pcsx2Config::GSOptions::GetVsync() const { - if (g_LimiterMode == Limit_Turbo) + if (g_LimiterMode == Limit_Turbo || !FrameLimitEnable) return 0; // D3D only support a boolean state. OpenGL waits a number of vsync diff --git a/pcsx2/gui/AppCoreThread.cpp b/pcsx2/gui/AppCoreThread.cpp index e84ee0600b..4eb8f0e803 100644 --- a/pcsx2/gui/AppCoreThread.cpp +++ b/pcsx2/gui/AppCoreThread.cpp @@ -512,7 +512,7 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src ) } if (m_ExecMode >= ExecMode_Paused) - GSsetVsync(EmuConfig.GS.FrameLimitEnable ? EmuConfig.GS.GetVsync() : 0); + GSsetVsync(EmuConfig.GS.GetVsync()); } // --------------------------------------------------------------------------------------