diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-29 15:50:20 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:32:44 +0200 |
commit | 2592da2273a580df7d854eecf4e0ac48a7a86162 (patch) | |
tree | a8cc1c69f2f9c84525452b910e4a56fb1521ae2e /src/core/main.cpp | |
parent | Make times more accurate (diff) | |
download | re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.gz re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.bz2 re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.lz re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.xz re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.zst re3-2592da2273a580df7d854eecf4e0ac48a7a86162.zip |
Diffstat (limited to 'src/core/main.cpp')
-rw-r--r-- | src/core/main.cpp | 5 |
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(); |