diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 12:47:10 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 23:39:47 +0200 |
commit | 14c71f39ff97684e6c6933cf18781e8d162d1be6 (patch) | |
tree | 15c68cd95c46d09c879e9753d397f12c28281d51 /src/core/main.cpp | |
parent | Don't restart OAL device when switching EAX (diff) | |
download | re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.gz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.bz2 re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.lz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.xz re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.tar.zst re3-14c71f39ff97684e6c6933cf18781e8d162d1be6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp index 90efdb62..4902c156 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -1131,8 +1131,11 @@ DisplayGameDebugText() #endif // #ifdef DRAW_GAME_VERSION_TEXT FrameSamples++; -#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND - FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds +#ifdef FIX_BUGS + // 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(); |