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.
This commit is contained in:
Jonathan Li 2017-08-21 23:05:42 +01:00
parent fecf8e3ed2
commit c02a545c7d
2 changed files with 3 additions and 10 deletions

View File

@ -510,6 +510,9 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
{ {
_parent::ApplySettings( fixup ); _parent::ApplySettings( fixup );
} }
if (m_ExecMode >= ExecMode_Paused)
GSsetVsync(EmuConfig.GS.FrameLimitEnable ? EmuConfig.GS.GetVsync() : 0);
} }
// -------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------

View File

@ -122,8 +122,6 @@ namespace Implementations
gsUpdateFrequency(g_Conf->EmuOptions); gsUpdateFrequency(g_Conf->EmuOptions);
GSsetVsync(g_Conf->EmuOptions.GS.GetVsync());
pauser.AllowResume(); pauser.AllowResume();
} }
@ -150,8 +148,6 @@ namespace Implementations
gsUpdateFrequency(g_Conf->EmuOptions); gsUpdateFrequency(g_Conf->EmuOptions);
GSsetVsync(g_Conf->EmuOptions.GS.GetVsync());
pauser.AllowResume(); pauser.AllowResume();
} }
@ -164,12 +160,6 @@ namespace Implementations
// Turbo/Slowmo don't make sense when framelimiter is toggled // Turbo/Slowmo don't make sense when framelimiter is toggled
g_LimiterMode = Limit_Nominal; 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(); pauser.AllowResume();
} }