From c16cd99dd46b40a1afc44ada4f034796230b02e4 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Thu, 3 Mar 2011 19:20:38 +0000 Subject: [PATCH] A few fixes for some situations I didn't consider. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4387 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/AppMain.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pcsx2/gui/AppMain.cpp b/pcsx2/gui/AppMain.cpp index af4f6a60c7..9a9c05cbdc 100644 --- a/pcsx2/gui/AppMain.cpp +++ b/pcsx2/gui/AppMain.cpp @@ -437,14 +437,14 @@ void Pcsx2App::LogicalVsync() FpsManager.DoFrame(); - if (EmuConfig.GS.ManagedVsync) + if (EmuConfig.GS.ManagedVsync && EmuConfig.GS.VsyncEnable) { + static bool last_enabled = true; // Avoids locking it in some scenarios + static int too_slow = 0; + static int fast_enough = 0; + if ( g_LimiterMode == Limit_Nominal && EmuConfig.GS.VsyncEnable && g_Conf->EmuOptions.GS.FrameLimitEnable ) { - static bool last_enabled = 0; - static int too_slow = 0; - static int fast_enough = 0; - float fps = (float)FpsManager.GetFramerate(); if( gsRegionMode == Region_NTSC ) @@ -491,7 +491,12 @@ void Pcsx2App::LogicalVsync() } } else + { + last_enabled = true; // Avoids locking it in some scenarios + too_slow = 0; + fast_enough = 0; GSsetVsync( 0 ); + } } // Only call PADupdate here if we're using GSopen2. Legacy GSopen plugins have the // GS window belonging to the MTGS thread.