mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-15 08:31:03 +00:00
Framerate counter should count frames, not scenes.
This commit is contained in:
parent
03e5fe3954
commit
78b5a73ee6
1 changed files with 3 additions and 3 deletions
|
@ -533,12 +533,12 @@ void SCR_DrawFPS (void)
|
||||||
int frames;
|
int frames;
|
||||||
|
|
||||||
elapsed_time = realtime - oldtime;
|
elapsed_time = realtime - oldtime;
|
||||||
frames = r_framecount - oldframecount;
|
frames = host_framecount - oldframecount;
|
||||||
|
|
||||||
if (elapsed_time < 0 || frames < 0)
|
if (elapsed_time < 0 || frames < 0)
|
||||||
{
|
{
|
||||||
oldtime = realtime;
|
oldtime = realtime;
|
||||||
oldframecount = r_framecount;
|
oldframecount = host_framecount;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// update value every 3/4 second
|
// update value every 3/4 second
|
||||||
|
@ -546,7 +546,7 @@ void SCR_DrawFPS (void)
|
||||||
{
|
{
|
||||||
lastfps = frames / elapsed_time;
|
lastfps = frames / elapsed_time;
|
||||||
oldtime = realtime;
|
oldtime = realtime;
|
||||||
oldframecount = r_framecount;
|
oldframecount = host_framecount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scr_showfps.value)
|
if (scr_showfps.value)
|
||||||
|
|
Loading…
Reference in a new issue