This should fix the framelimiter, looks a bit inaccurate though (was it like that already ?)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3929 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a56a07056d
commit
a9cf2e09d0
|
@ -602,17 +602,18 @@ void Callback_VideoCopiedToXFB(bool video_update)
|
||||||
static Common::Timer Timer;
|
static Common::Timer Timer;
|
||||||
static u32 frames = 0;
|
static u32 frames = 0;
|
||||||
static u32 videoupd = 0;
|
static u32 videoupd = 0;
|
||||||
|
static u64 old_frametime=0;
|
||||||
|
|
||||||
if (video_update)
|
if (video_update)
|
||||||
videoupd++;
|
videoupd++;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
frames++;
|
frames++;
|
||||||
|
|
||||||
// Custom frame limiter
|
// Custom frame limiter
|
||||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||||
|
|
||||||
u32 targetfps = (SConfig::GetInstance().m_Framelimit)*5;
|
u32 targetfps = (SConfig::GetInstance().m_Framelimit)*5;
|
||||||
static u64 old_frametime=0;
|
|
||||||
u64 new_frametime;
|
u64 new_frametime;
|
||||||
s16 wait_frametime;
|
s16 wait_frametime;
|
||||||
|
|
||||||
|
@ -626,6 +627,7 @@ void Callback_VideoCopiedToXFB(bool video_update)
|
||||||
if (wait_frametime > 0)
|
if (wait_frametime > 0)
|
||||||
Common::SleepCurrentThread(wait_frametime*2);
|
Common::SleepCurrentThread(wait_frametime*2);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Timer.GetTimeDifference() >= 1000)
|
if (Timer.GetTimeDifference() >= 1000)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue