diff options
| author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-29 03:32:21 +0300 |
|---|---|---|
| committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-29 19:23:02 +0300 |
| commit | d52b917c549719addf45788413210ea1700cd0d5 (patch) | |
| tree | fde2b07530985399054640435b638d00bbb4f10c /src/core/main.cpp | |
| parent | Update build-cmake-conan.yml (diff) | |
| download | re3-d52b917c549719addf45788413210ea1700cd0d5.tar.gz | |
Some regular fixes and UB fixes
Diffstat (limited to 'src/core/main.cpp')
| -rw-r--r-- | src/core/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 ) { |
