godotengine / godotengine/godot
FPS cap with V-Sync enabled is incorrect with multiple monitors with different refresh rates
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in 4.2.stable
- Not reproducible in 3.5.3.stable
### System information
Windows 10
### Issue description
I have two monitors: one is 144Hz and the other is 60Hz. If I run an empty project with V-Sync enabled, the FPS is always capped at 144. Even if I drag the game window to my 60Hz monitor, the game is still capped at 144 FPS. This is different from Godot 3.5.3, where if I dragged the game window to my 60Hz monitor, the FPS cap would update to 60, which I believe should be the intended behavior.
Even if I launch the game window on my 60Hz monitor by setting the initial_position_type in ProjectSettings, the FPS is still capped at 144 rather than 60.
### Steps to reproduce
Create a new project with V-Sync enabled. Check the fps as you move the game window between two monitors with different refresh rates.
### Minimal reproduction project (MRP)
N/A
Contributor guide
Research direction
Reproduce the issue in an empty Godot project with V-Sync enabled, using 144 Hz and 60 Hz monitors on Windows 10. Start by tracing the V-Sync and window-monitor handling around moving the game window or using initial_position_type, and compare the behavior with Godot 3.5.3. Done means the FPS cap follows the active monitor's refresh rate as the window moves between monitors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, game-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100