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

Limit the frame rate when minimized #1

Open
wants to merge 1 commit into
base: Branch_v1.4-bd_-r2
Choose a base branch
from

Conversation

TCL987
Copy link

@TCL987 TCL987 commented Oct 11, 2023

Fixes: bdunderscore#8

When the application is minimized rendering is skipped and doesn't limit the RunLoop frequency. This causes unnecessarily high CPU usage.

This PR fixes the issue by sleeping the thread as needed to limit it to 60 FPS similar to when it isn't minimized. This should be fast enough to not impact continuous calibration as CalibrationTick only actually runs every 50ms.

This avoids high CPU usage when minimized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant