Marginally improve FPS counting logic in the video plugins.

Should fix DX11 peaking at 59 FPS instead of 60 FPS.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6026 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-08-01 14:43:07 +00:00
parent 910d543536
commit d411924eee
3 changed files with 13 additions and 14 deletions

View File

@ -1004,11 +1004,11 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
// update FPS counter
static int fpscount = 0;
static unsigned long lasttime = Common::Timer::GetTimeMs();
static unsigned long lasttime = 0;
if (Common::Timer::GetTimeMs() - lasttime >= 1000)
{
lasttime = Common::Timer::GetTimeMs();
s_fps = fpscount-1;
s_fps = fpscount;
fpscount = 0;
}
if (XFBWrited) ++fpscount;