Updated sdl to use new VOUT_DISPLAY_CHANGE_DISPLAY_SIZE parameter.
[vlc.git] / modules / video_output / sdl.c
index 203b52b..d110c1b 100644 (file)
@@ -477,11 +477,13 @@ static int Control(vout_display_t *vd, int query, va_list args)
 
     case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: {
         const vout_display_cfg_t *cfg = va_arg(args, const vout_display_cfg_t *);
+        const bool is_forced = (bool)va_arg(args, int);
 
         /* */
-        sys->display = SDL_SetVideoMode(cfg->display.width,
-                                        cfg->display.height,
-                                        sys->display_bpp, sys->display_flags);
+        if (is_forced)
+            sys->display = SDL_SetVideoMode(cfg->display.width,
+                                            cfg->display.height,
+                                            sys->display_bpp, sys->display_flags);
         if (!sys->display) {
             sys->display = SDL_SetVideoMode(vd->cfg->display.width,
                                             vd->cfg->display.height,