# HG changeset patch # User reimar # Date 1337721295 0 # Node ID 9fbab723e75a3b9d34fe873f5f3696cb77c02cf5 # Parent f1b634f51b97a130cf3ae128be4eea66d7a8a288 SDL swap interval fixes. Skip setting it for negative values and fix compilation with SDL 1.3. diff -r f1b634f51b97 -r 9fbab723e75a libvo/vo_gl.c --- a/libvo/vo_gl.c Tue May 22 18:01:51 2012 +0000 +++ b/libvo/vo_gl.c Tue May 22 21:14:55 2012 +0000 @@ -661,10 +661,14 @@ #endif #ifdef CONFIG_GL_SDL if (glctx.type == GLTYPE_SDL) { -#if SDL_VERSION_ATLEAST(1, 2, 10) // Ugly to do this here, but SDL ignores it if set later - SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, swap_interval); + if (swap_interval >= 0) { +#if SDL_VERSION_ATLEAST(1, 3, 0) + SDL_GL_SetSwapInterval(swap_interval); +#elif SDL_VERSION_ATLEAST(1, 2, 10) + SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, swap_interval); #endif + } if (!vo_sdl_config(d_width, d_height, flags, title)) return -1; }