mirror of https://github.com/PCSX2/pcsx2.git
Stabilized the framelimiting part of the frameskipper.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@386 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
233559de5c
commit
9f70fb2612
|
@ -115,7 +115,7 @@ void rcntInit() {
|
|||
// debug code, used for stats
|
||||
int g_nCounters[4];
|
||||
static int iFrame = 0;
|
||||
long iFrameLimitEnable = 1;
|
||||
//long iFrameLimitEnable = 1;
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/time.h>
|
||||
|
@ -236,7 +236,7 @@ u32 UpdateVSyncRate()
|
|||
}
|
||||
|
||||
m_iStart = GetCPUTicks();
|
||||
iFrameLimitEnable = 1;
|
||||
//iFrameLimitEnable = 1;
|
||||
|
||||
cpuRcntSet();
|
||||
|
||||
|
@ -340,11 +340,11 @@ static __forceinline void frameLimit()
|
|||
|
||||
if( CHECK_FRAMELIMIT == PCSX2_FRAMELIMIT_NORMAL ) return;
|
||||
if( Config.CustomFps >= 999 ) return; // means the user would rather just have framelimiting turned off...
|
||||
if( !iFrameLimitEnable ) // Frameskipper disabled the limiter
|
||||
/*if( !iFrameLimitEnable ) // Frameskipper disabled the limiter
|
||||
{
|
||||
m_iStart = GetCPUTicks();
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
uExpectedEnd = m_iStart + m_iTicks;
|
||||
iEnd = GetCPUTicks();
|
||||
|
@ -373,12 +373,12 @@ static __forceinline void frameLimit()
|
|||
_TIMESLICE();
|
||||
iEnd = GetCPUTicks();
|
||||
|
||||
if( !(*(volatile long*)&iFrameLimitEnable) )
|
||||
/*if( !(*(volatile long*)&iFrameLimitEnable) )
|
||||
{
|
||||
// Frameskipper turned us off
|
||||
m_iStart = iEnd;
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
sDeltaTime = iEnd - uExpectedEnd;
|
||||
}
|
||||
|
|
10
pcsx2/GS.cpp
10
pcsx2/GS.cpp
|
@ -1646,7 +1646,7 @@ void gifMFIFOInterrupt()
|
|||
cpuRegs.interrupt &= ~(1 << 11);
|
||||
}
|
||||
|
||||
extern "C" long iFrameLimitEnable; // used to enable/disable the EE framelimiter.
|
||||
//extern "C" long iFrameLimitEnable; // used to enable/disable the EE framelimiter.
|
||||
|
||||
// FrameSkipper - Measures delta time between calls and issues frameskips
|
||||
// it the time is too long. Also regulates the status of the EE's framelimiter.
|
||||
|
@ -1703,7 +1703,7 @@ static __forceinline void frameSkip()
|
|||
{
|
||||
//SysPrintf( "Frameskip Initiated! Lateness: %d\n", (int)( sSlowDeltaTime / m_iSlowTicks ) );
|
||||
|
||||
InterlockedExchange( &iFrameLimitEnable, 0 );
|
||||
//InterlockedExchange( &iFrameLimitEnable, 0 );
|
||||
GSsetFrameSkip(1);
|
||||
|
||||
if( CHECK_FRAMELIMIT == PCSX2_FRAMELIMIT_VUSKIP )
|
||||
|
@ -1717,7 +1717,7 @@ static __forceinline void frameSkip()
|
|||
{
|
||||
// Running at or above full speed, so reset the StartTime
|
||||
|
||||
InterlockedExchange( &iFrameLimitEnable, 1 );
|
||||
//InterlockedExchange( &iFrameLimitEnable, 1 );
|
||||
m_iSlowStart = iEnd;
|
||||
}
|
||||
justSkipped = false;
|
||||
|
@ -1763,7 +1763,7 @@ static __forceinline void frameSkip()
|
|||
|
||||
if( sSlowDeltaTime < 0 )
|
||||
{
|
||||
InterlockedExchange( &iFrameLimitEnable, 1 );
|
||||
//InterlockedExchange( &iFrameLimitEnable, 1 );
|
||||
m_iSlowStart = iEnd;
|
||||
}
|
||||
}
|
||||
|
@ -1796,7 +1796,7 @@ extern "C" void GSPostVsyncEnd()
|
|||
static void _resetFrameskip()
|
||||
{
|
||||
InterlockedExchangePointer( &Cpu->ExecuteVU1Block, s_prevExecuteVU1Block );
|
||||
InterlockedExchange( &iFrameLimitEnable, 1 );
|
||||
//InterlockedExchange( &iFrameLimitEnable, 1 );
|
||||
GSsetFrameSkip( 0 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue