Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framerate limiter does not operate as intended #1798

Open
Kay-STL opened this issue Feb 6, 2025 · 0 comments
Open

Framerate limiter does not operate as intended #1798

Kay-STL opened this issue Feb 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Kay-STL
Copy link
Contributor

Kay-STL commented Feb 6, 2025

Describe the bug
The framerate limiter (MaxFps global property) does not operate as intended.
The check, which occurs here, simply runs Task.Delay for the equivalent TimeSpan of the MaxFps setting (TimeSpan.FromSeconds(1/MaxFps)).

This results in the actual framerate being much lower than the limit - with the default MaxFps = 65, I observe around 40-45 FPS max, despite the device having far more perf headroom.

To Reproduce
Steps to reproduce the behavior:

  1. Set MaxFps to 60
  2. Enable ShowFPS
  3. Observe the actual framerate is much lower than 60

Expected behavior
The draw loop should be checking the time elapsed between draws and returning before any work occurs if it isn't greater than or equal to the MaxFps TimeSpan, rather than delaying the task.

@beto-rodriguez beto-rodriguez added the enhancement New feature or request label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants