From 9a4b2bd360a5d57cbae91f8c7ca7e866df36baa4 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Wed, 23 Jul 2014 19:46:12 -0500 Subject: [PATCH] sdl2: restore vsync option (use sdl swap interval) --- src/sdl2/ogl_sdl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sdl2/ogl_sdl.c b/src/sdl2/ogl_sdl.c index a08387e2..a7456253 100644 --- a/src/sdl2/ogl_sdl.c +++ b/src/sdl2/ogl_sdl.c @@ -247,6 +247,12 @@ void OglSdlFinishUpdate(boolean waitvbl) } oldwaitvbl = waitvbl;*/ + if (oldwaitvbl != waitvbl) + { + SDL_GL_SetSwapInterval(waitvbl ? 1 : 0); + } + oldwaitvbl = waitvbl; + SDL_GL_SwapWindow(window); }