Closed Adiveler closed 1 year ago
Disabling G-Sync doesn't seem to solve the issue, it's still locked on 50 FPS.
Thanks, I have no idea of what could be causing this, and it seems to be a low-priority issue. I'll wait to see if someone can pinpoint the cause.
The cause is here: https://github.com/GDQuest/learn-gdscript/blob/6f52f8f76c3b03fefe8a99fe9aec7398f94e02bd/ui/UICore.gd#L31
No matter the value of Engine.target_fps
, the engine will always sleep at least 20,000 microseconds between frames (= 20 milliseconds). This equates to 50 FPS at most.
When using low processor mode, I recommend not setting Engine.target_fps
. Instead, set OS.low_processor_mode_sleep_usec
to 1_000_000 / fps
where fps
is the maximum FPS as an integer.
Eventually, we should deprecate OS.low_processor_mode_sleep_usec
entirely and only rely on Engine.target_fps
to avoid this kind of "double limit" issue, but this will have to wait for Godot 4.1 at the earliest.
PS: While doing this, it's a good opportunity to disable V-Sync in the project settings to decrease input lag (on platforms that support disabling V-Sync). This should make scrolling and selecting text feel noticeably snappier. While disabling V-Sync will result in tearing, it's usually hard to notice in non-game applications.
Thanks, gonna fix right away
Describe the bug App is locked on 50 FPS, no matter what option I choose (30 FPS works as intended though)
To Reproduce Steps to reproduce the bug:
Expected behavior 60 FPS for 60, and 144 FPS (my desktop cap FPS) for no limit
Screenshots
Information about your device (please complete the following information):
Additional context I'm using G-Sync for performance; and MSI Afterburner for monitoring (FPS, RAM, CPU and GPU temperatures during demanding games, etc…)