mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- I_FPSTime may not return the time at frame start.
This is used for real-time profiling and as such needs to return the current time or most of its uses will break.
This commit is contained in:
parent
93e9c383fa
commit
f54475b1f1
2 changed files with 4 additions and 7 deletions
|
@ -226,7 +226,7 @@ void CheckBench()
|
|||
{
|
||||
// if we started the FPS counter ourselves or ran from the console
|
||||
// we need to wait for it to stabilize before using it.
|
||||
if (waitstart > 0 && I_MSTime() < waitstart + 5000) return;
|
||||
if (waitstart > 0 && I_FPSTime() - waitstart < 5000) return;
|
||||
|
||||
FString compose;
|
||||
|
||||
|
@ -257,12 +257,12 @@ CCMD(bench)
|
|||
if (vid_fps == 0)
|
||||
{
|
||||
vid_fps = 1;
|
||||
waitstart = I_MSTime();
|
||||
waitstart = I_FPSTime();
|
||||
switchfps = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ConsoleState == c_up) waitstart = I_MSTime();
|
||||
if (ConsoleState == c_up) waitstart = I_FPSTime();
|
||||
switchfps = false;
|
||||
}
|
||||
C_HideConsole ();
|
||||
|
|
|
@ -142,9 +142,6 @@ uint64_t I_NSTime()
|
|||
|
||||
uint64_t I_FPSTimeNS()
|
||||
{
|
||||
if (FreezeTime == 0)
|
||||
return CurrentFrameStartTime;
|
||||
else
|
||||
return GetClockTimeNS();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue