summaryrefslogtreecommitdiffstats
path: root/src/core/main.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-24 23:47:06 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 23:47:06 +0200
commite671fe682d48cc61b9d31373914269da2757aef7 (patch)
treeeed8d9fb806564ea3bd272c75e9af88063a6e747 /src/core/main.cpp
parentMerge branch miami into lcs (diff)
parentFrontend fix (diff)
downloadre3-e671fe682d48cc61b9d31373914269da2757aef7.tar
re3-e671fe682d48cc61b9d31373914269da2757aef7.tar.gz
re3-e671fe682d48cc61b9d31373914269da2757aef7.tar.bz2
re3-e671fe682d48cc61b9d31373914269da2757aef7.tar.lz
re3-e671fe682d48cc61b9d31373914269da2757aef7.tar.xz
re3-e671fe682d48cc61b9d31373914269da2757aef7.tar.zst
re3-e671fe682d48cc61b9d31373914269da2757aef7.zip
Diffstat (limited to 'src/core/main.cpp')
-rw-r--r--src/core/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 8267a1b2..9d540635 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -1145,8 +1145,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();