fix: vsync frame cap follows the active monitor's refresh rate #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/vsync-active-monitor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For 0.3.2. VSync took the fps cap from the PRIMARY monitor's refresh and never updated when the window moved to another screen.
Fix: a small native-windowed frame limiter (system_settings.rs) -- while VSync is on it reads the refresh of whichever monitor the window's centre is on and spin-sleeps each frame to that rate; VSync off stays uncapped; gated out of wasm/headless.
Note: untestable in CI (needs a multi-monitor rig). Keys off window.position -- if Bevy doesn't update that on a manual drag between monitors, switch to WindowMoved events.