From 3b83514df48a060a75d4c416a68e78f9a4f7e892 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 19 May 2014 13:00:22 -0600 Subject: [PATCH] fix handling of vsync --- Quake/gl_vidsdl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Quake/gl_vidsdl.c b/Quake/gl_vidsdl.c index b21f3a3a..53b7e310 100644 --- a/Quake/gl_vidsdl.c +++ b/Quake/gl_vidsdl.c @@ -807,7 +807,13 @@ static void GL_CheckExtensions (void) { Con_Warning ("vertical sync not supported (SDL_GL_SetAttribute failed)\n"); } -#if !defined(USE_SDL2) +#if defined(USE_SDL2) + else if ((swap_control = SDL_GL_GetSwapInterval()) == -1) + { + gl_swap_control = false; + Con_Warning ("vertical sync not supported (SDL_GL_GetSwapInterval failed)\n"); + } +#else else if (SDL_GL_GetAttribute(SDL_GL_SWAP_CONTROL, &swap_control) == -1) { gl_swap_control = false;