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

GUI: Fix cursor stuttering with vsync enabled #3534

Merged
merged 3 commits into from Nov 21, 2021
Merged

Conversation

@lotharsm
Copy link
Member

@lotharsm lotharsm commented Nov 13, 2021

Currently, with vsync enabled, the mouse cursor in the GUI Launcher feels very sluggish on a 60 Hz display. The issue is that the artificial waiting/frame times in the GUI launcher code cause a race condition between VSync an GUI manager's own frame timing.

This patch fixes this by skipping our own frametime calculation with VSync enabled. Hardcoding it to delayMillis(1); is required here since otherwise, ScummVM would always max out one CPU thread entirely.

gui/gui-manager.cpp Outdated Show resolved Hide resolved
Loading
gui/gui-manager.cpp Show resolved Hide resolved
Loading
@sev-
Copy link
Member

@sev- sev- commented Nov 21, 2021

Thanks!

Loading

@sev- sev- merged commit d59b312 into scummvm:master Nov 21, 2021
8 checks passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants