]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
vid_vsync: fully support adaptive, remove polling, print better errors
authorbones_was_here <bones_was_here@xonotic.au>
Tue, 3 Oct 2023 17:24:44 +0000 (03:24 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Wed, 8 Nov 2023 17:25:58 +0000 (03:25 +1000)
commit0b02091d9a19d2a37744309eea401cf7663742a2
treed2490560bb09018baf4493184e0bc33eac17c3ae
parentef24b9e6fb67d5b385b813e5b48b5f8140a411a3
vid_vsync: fully support adaptive, remove polling, print better errors

Adaptive vsync was partially supported: it worked if set before window
creation but not if toggled on afterwards, and wasn't mentioned in the
cvar description.

The immediate application of `vid_vsync` cvar changes was implented by
polling, which was ok for one cvar but I'll be making more vid_ cvars
apply immediately (no vid_restart needed), and don't want to poll for
things that rarely change every frame.

SDL is now queried for the current state of vsync instead of storing
what we believe to be the current state.

If the setting can't be applied the reason (as reported by SDL) is now
printed.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
cl_demo.c
cl_main.c
vid_sdl.c
vid_shared.c