Disable vsync when going from "limit" to "skip" framelimit mode.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1626 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2009-08-15 11:25:52 +00:00
parent b6cce7c560
commit d156fcfddb
1 changed files with 19 additions and 11 deletions

View File

@ -499,16 +499,6 @@ void CycleFrameLimit(int dir)
newOptions = (Config.Options & ~PCSX2_FRAMELIMIT_MASK) | newFrameLimit;
gsResetFrameSkip();
// Allows sync to vblank only when framelimit is on, if GS can.
if(GSsetFrameLimit == NULL)
{
DevCon::Notice("Notice: GS Plugin does not implement GSsetFrameLimit.");
}
else
{
GSsetFrameLimit(newFrameLimit);
}
switch(newFrameLimit) {
case PCSX2_FRAMELIMIT_NORMAL:
@ -516,6 +506,15 @@ void CycleFrameLimit(int dir)
break;
case PCSX2_FRAMELIMIT_LIMIT:
limitMsg = "Limit";
//Tell GS plugin we want a frame limit, it can enable vsync then
if(GSsetFrameLimit == NULL)
{
DevCon::Notice("Notice: GS Plugin does not implement GSsetFrameLimit.");
}
else
{
GSsetFrameLimit(newFrameLimit);
}
break;
case PCSX2_FRAMELIMIT_SKIP:
if( GSsetFrameSkip == NULL )
@ -530,8 +529,16 @@ void CycleFrameLimit(int dir)
// are properly synchronized.
gsDynamicSkipEnable();
limitMsg = "Skip";
//Disables eventually enabled vsync
if(GSsetFrameLimit == NULL)
{
DevCon::Notice("Notice: GS Plugin does not implement GSsetFrameLimit.");
}
else
{
GSsetFrameLimit(0);
}
}
break;
}
Threading::AtomicExchange( Config.Options, newOptions );
@ -539,6 +546,7 @@ void CycleFrameLimit(int dir)
Console::Notice("Frame Limit Mode Changed: %s", params limitMsg );
// [Air]: Do we really want to save runtime changes to frameskipping?
// I'd rather do that, yeah :p (rama)
//SaveConfig();
}