summaryrefslogtreecommitdiffstats
path: root/src/core/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/main.cpp')
-rw-r--r--src/core/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 492f481e..6a773ba5 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -1177,7 +1177,10 @@ DisplayGameDebugText()
FrameSamples++;
#ifdef FIX_BUGS
- FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds
+ // this is inaccurate with over 1000 fps
+ static uint32 PreviousTimeInMillisecondsPauseMode = 0;
+ FramesPerSecondCounter += (CTimer::GetTimeInMillisecondsPauseMode() - PreviousTimeInMillisecondsPauseMode) / 1000.0f; // convert to seconds
+ PreviousTimeInMillisecondsPauseMode = CTimer::GetTimeInMillisecondsPauseMode();
FramesPerSecond = FrameSamples / FramesPerSecondCounter;
#else
FramesPerSecondCounter += 1000.0f / CTimer::GetTimeStepNonClippedInMilliseconds();