]> git.sesse.net Git - vlc/commitdiff
Fix compilation error with SDL under 1.2.10
authorRémi Duraffort <ivoire@videolan.org>
Sun, 13 Jan 2008 22:23:17 +0000 (22:23 +0000)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 13 Jan 2008 22:23:17 +0000 (22:23 +0000)
modules/video_output/sdl.c

index 9aa8f5f3eb8f7e908e542df4848e4b5b96ba574a..30bc1bdf786e0a38a126318ad084833e12944eaf 100644 (file)
@@ -59,8 +59,10 @@ struct vout_sys_t
     int i_width;
     int i_height;
 
+#if SDL_VERSION_ATLEAST(1,2,10)
     unsigned int i_desktop_width;
     unsigned int i_desktop_height;
+#endif
 
     /* For YUV output */
     SDL_Overlay * p_overlay;   /* An overlay we keep to grab the XVideo port */
@@ -211,8 +213,11 @@ static int Open ( vlc_object_t *p_this )
     SDL_EnableUNICODE(1);
 
     /* Get the desktop resolution */
+#if SDL_VERSION_ATLEAST(1,2,10)
+    /* FIXME: SDL has a problem with virtual desktop */
     p_vout->p_sys->i_desktop_width = SDL_GetVideoInfo()->current_w;
     p_vout->p_sys->i_desktop_height = SDL_GetVideoInfo()->current_h;
+#endif
 
     /* Create the cursor */
     p_vout->p_sys->b_cursor = 1;
@@ -742,10 +747,17 @@ static int OpenDisplay( vout_thread_t *p_vout )
     uint32_t i_chroma = 0;
 
     /* Set main window's size */
+#if SDL_VERSION_ATLEAST(1,2,10)
     p_vout->p_sys->i_width = p_vout->b_fullscreen ? p_vout->p_sys->i_desktop_width :
                                                     p_vout->i_window_width;
     p_vout->p_sys->i_height = p_vout->b_fullscreen ? p_vout->p_sys->i_desktop_height :
                                                      p_vout->i_window_height;
+#else
+    p_vout->p_sys->i_width = p_vout->b_fullscreen ? p_vout->output.i_width :
+                                                    p_vout->i_window_width;
+    p_vout->p_sys->i_height = p_vout->b_fullscreen ? p_vout->output.i_height :
+                                                     p_vout->i_window_height;
+#endif
 
     /* Initialize flags and cursor */
     i_flags = SDL_ANYFORMAT | SDL_HWPALETTE | SDL_HWSURFACE | SDL_DOUBLEBUF;