Target the desired frame rate exactly rather than n plus one.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5713 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
391312641c
commit
8d2a23e43b
|
@ -607,7 +607,7 @@ void VideoThrottle()
|
||||||
if (SConfig::GetInstance().m_Framelimit)
|
if (SConfig::GetInstance().m_Framelimit)
|
||||||
{
|
{
|
||||||
// Make the limiter a bit loose
|
// Make the limiter a bit loose
|
||||||
u32 frametime = ((SConfig::GetInstance().b_UseFPS)? Common::AtomicLoad(DrawnFrame) : DrawnVideo) * 1000 / ++TargetVPS;
|
u32 frametime = ((SConfig::GetInstance().b_UseFPS)? Common::AtomicLoad(DrawnFrame) : DrawnVideo) * 1000 / TargetVPS;
|
||||||
while ((u32)Timer.GetTimeDifference() < frametime)
|
while ((u32)Timer.GetTimeDifference() < frametime)
|
||||||
Common::YieldCPU();
|
Common::YieldCPU();
|
||||||
//Common::SleepCurrentThread(1);
|
//Common::SleepCurrentThread(1);
|
||||||
|
@ -620,7 +620,7 @@ void VideoThrottle()
|
||||||
SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||||
|
|
||||||
u32 FPS = Common::AtomicLoad(DrawnFrame) * 1000 / ElapseTime;
|
u32 FPS = Common::AtomicLoad(DrawnFrame) * 1000 / ElapseTime;
|
||||||
u32 VPS = --DrawnVideo * 1000 / ElapseTime;
|
u32 VPS = DrawnVideo * 1000 / ElapseTime;
|
||||||
u32 Speed = VPS * 100 / VideoInterface::TargetRefreshRate;
|
u32 Speed = VPS * 100 / VideoInterface::TargetRefreshRate;
|
||||||
|
|
||||||
// Settings are shown the same for both extended and summary info
|
// Settings are shown the same for both extended and summary info
|
||||||
|
|
Loading…
Reference in New Issue