Skip to content
Snippets Groups Projects

Fix inaccuracies in FPS counter

Merged Hanicef requested to merge Hanicef/SRB2Classic: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

Checking pipeline status.

Approval is optional

Merged by SalSal 1 year ago (Jul 24, 2023 10:57am UTC)

Merge details

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading