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
[Bug]: High CPU usage when Vsync is enabled on Win32 videodriver #10079
Comments
I can't reproduce this issue for me on my 60 Hz setup with an Intel i5-9400F and a GTX 1660. |
pc: intel i7 9700k laptop intel i5 10210u @ 1.6 GHz |
Hmm, I checked with a completely new openttd.cfg - problems are gone, everything works as it should. The difference that I found was |
With In this mode, disabling vsync instantly brings the FPS back to the value specified in "Display refresh rate", while turning it back on sets the limit to 1000 Hz. |
Okay, now another problem has appeared - at a non-standard refresh rate (75Hz) when using «empty» driver and vsync, in full screen mode, fps drops to ~50, and it becomes very unpleasant to play. |
Okay, this bug is cute, and a typical case of us not handling all cases properly. What goes wrong here, is that Why? Most likely a 1ms sleep in the driver-thread that is not causing it to go to 10000000000fps; as the That is just cute :) |
Version of OpenTTD
Windows 12.2
Expected result
With vsync enabled, FPS is automatically tied to the screen refresh rate, the processor is used in normal mode
Actual result
FPS limit is removed completely, the game runs at 999+ fps, OpenTTD creates a high CPU load (one core).
Re-tested on a weaker laptop without a discrete GPU, the result is similar, ~999 fps and high load
Steps to reproduce
The text was updated successfully, but these errors were encountered: