From 5408e243a9c91131e2e1c2baa0dd13f0f05bb364 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 3 Sep 2025 02:03:26 -0400 Subject: [PATCH] - fix previous `vid_fps` `i_timescale` adjustment; previous fix did not take into account how the fps meter actually worked --- src/d_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index a2d65314c..d72887906 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -811,14 +811,14 @@ void CalcFps() { static uint64_t LastMS = 0, LastSec = 0, FrameCount = 0, LastTic = 0; - uint64_t ms = screen->FrameTime / i_timescale; - uint64_t howlong = ms - LastMS; + uint64_t ms = screen->FrameTime; + uint64_t howlong = (ms - LastMS) / i_timescale; if ((signed)howlong > 0) // do this only once per frame. { uint32_t thisSec = (uint32_t)(ms / 1000); if (LastSec < thisSec) { - LastFPS = FrameCount / (thisSec - LastSec); + LastFPS = FrameCount / (thisSec - LastSec) * i_timescale; LastSec = thisSec; FrameCount = 0; }