Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

V-sync setting values are off by 1

Open slipher opened this issue 6 months ago • 2 comments

On my Linux machine, r_swapInterval 2 does the same as r_swapInterval 1. r_swapInterval 3 goes at half the refresh rate (which is what 2 should do). Setting it to 4 makes it go at 1/3 the refresh rate, which the setting 3 should do, etc. Same for the negative values: -3 behaves as should -2 and so on.

This happens with both SDL2 and SDL3.

slipher avatar Aug 16 '25 11:08 slipher

According to https://github.com/DaemonEngine/Daemon/blob/da191b2b87b3f9e3b3339373f9b52d3c718b7c23/src/engine/sys/sdl_glimp.cpp#L577 this is an undocumented feature for values outside of [-1, 1]? Perhaps the window manager just does something unexpected with those values?

VReaperV avatar Aug 16 '25 12:08 VReaperV

Cf https://github.com/DaemonEngine/Daemon/pull/497 for a big investigation by @illwieckz on the subject

necessarily-equal avatar Oct 19 '25 12:10 necessarily-equal