Skip to content

Fix inaccuracies in FPS counter

Hanicef requested to merge Hanicef/SRB2:fix-inaccurate-fps-counter into next

No offense to the previous coder, but the previous FPS counter was horribly implemented. How it worked is that it grabbed a set of FPS samples, spaced them over time and summed them. The problems with that approach, however, was:

  • Frames too close to each other were ignored, causing frame drops to either not impact the counter or have a much higher effect than it should
  • Since the samples were spaced, it was possible for it to keep samples that are many seconds old.

Either way, I simplified the counter to just counting the previous frames and summing them, and it's now way more accurate. It's not perfect, but it's closest to the current behavior while still fixing the problem.

Fixes #1047 (closed)

Edited by Hanicef

Merge request reports

Loading