From c02a545c7d6b461321416447b583734991166a3f Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Mon, 21 Aug 2017 23:05:42 +0100 Subject: [PATCH] pcsx2: Apply vsync changes immediately on settings change Fixes an issue where changes to the vsync settings are not applied until emulation is paused and resumed. --- pcsx2/gui/AppCoreThread.cpp | 3 +++ pcsx2/gui/GlobalCommands.cpp | 10 ---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/pcsx2/gui/AppCoreThread.cpp b/pcsx2/gui/AppCoreThread.cpp index a34268cf48..e84ee0600b 100644 --- a/pcsx2/gui/AppCoreThread.cpp +++ b/pcsx2/gui/AppCoreThread.cpp @@ -510,6 +510,9 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src ) { _parent::ApplySettings( fixup ); } + + if (m_ExecMode >= ExecMode_Paused) + GSsetVsync(EmuConfig.GS.FrameLimitEnable ? EmuConfig.GS.GetVsync() : 0); } // -------------------------------------------------------------------------------------- diff --git a/pcsx2/gui/GlobalCommands.cpp b/pcsx2/gui/GlobalCommands.cpp index 5be6ece48c..30a1c84ed6 100644 --- a/pcsx2/gui/GlobalCommands.cpp +++ b/pcsx2/gui/GlobalCommands.cpp @@ -122,8 +122,6 @@ namespace Implementations gsUpdateFrequency(g_Conf->EmuOptions); - GSsetVsync(g_Conf->EmuOptions.GS.GetVsync()); - pauser.AllowResume(); } @@ -150,8 +148,6 @@ namespace Implementations gsUpdateFrequency(g_Conf->EmuOptions); - GSsetVsync(g_Conf->EmuOptions.GS.GetVsync()); - pauser.AllowResume(); } @@ -164,12 +160,6 @@ namespace Implementations // Turbo/Slowmo don't make sense when framelimiter is toggled g_LimiterMode = Limit_Nominal; - // Disable Vsync when frame limited is disabled - if( g_Conf->EmuOptions.GS.FrameLimitEnable ) - GSsetVsync(g_Conf->EmuOptions.GS.GetVsync()); - else - GSsetVsync(0); - pauser.AllowResume(); }