[MPlayer-cvslog] r34962 - trunk/libvo/vo_gl.c
reimar
subversion at mplayerhq.hu
Tue May 22 23:14:55 CEST 2012
Author: reimar
Date: Tue May 22 23:14:55 2012
New Revision: 34962
Log:
SDL swap interval fixes.
Skip setting it for negative values and fix compilation
with SDL 1.3.
Modified:
trunk/libvo/vo_gl.c
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c Tue May 22 20:01:51 2012 (r34961)
+++ trunk/libvo/vo_gl.c Tue May 22 23:14:55 2012 (r34962)
@@ -661,10 +661,14 @@ static int create_window(uint32_t d_widt
#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;
}
More information about the MPlayer-cvslog
mailing list