From d52b917c549719addf45788413210ea1700cd0d5 Mon Sep 17 00:00:00 2001 From: erorcun Date: Fri, 29 Jan 2021 03:32:21 +0300 Subject: Some regular fixes and UB fixes --- src/core/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/main.cpp') diff --git a/src/core/main.cpp b/src/core/main.cpp index 66cb5635..af0d556a 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -1110,8 +1110,13 @@ DisplayGameDebugText() #endif // #ifdef DRAW_GAME_VERSION_TEXT FrameSamples++; +#ifdef FIX_BUGS + FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds + FramesPerSecond = FrameSamples / FramesPerSecondCounter; +#else FramesPerSecondCounter += 1000.0f / (CTimer::GetTimeStepNonClippedInSeconds() * 1000.0f); FramesPerSecond = FramesPerSecondCounter / FrameSamples; +#endif if ( FrameSamples > 30 ) { -- cgit v1.2.3