]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
vid_vsync: work around Wayland-specific init bug
[xonotic/darkplaces.git] / vid_sdl.c
index 88ec122efb485eaabc925f6daa14e2f7db59461f..11868087460cb021753c97bc82a5f442ee2fc742 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -1480,8 +1480,12 @@ static void VID_SetVsync_c(cvar_t *var)
 
        if (!context)
                return;
+/*
+Can't check first: on Wayland SDL_GL_GetSwapInterval() may initially return 0 when vsync is on.
+On Xorg it returns the correct value.
        if (SDL_GL_GetSwapInterval() == vsyncwanted)
                return;
+*/
 
        if (SDL_GL_SetSwapInterval(vsyncwanted) >= 0)
                Con_DPrintf("Vsync %s\n", vsyncwanted ? "activated" : "deactivated");