vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys;
+ if (vout_display_IsWindowed(vd))
+ return VLC_EGENERIC;
#if !defined(_WIN32) && !defined(__OS2__)
if (!vlc_xlib_init (object))
return VLC_EGENERIC;
msg_Err(vd, "no video mode available");
goto error;
}
- vout_display_DeleteWindow(vd, NULL);
sys->display = SDL_SetVideoMode(display_width, display_height,
sys->display_bpp, sys->display_flags);
vd->manage = Manage;
/* */
- vout_display_SendEventDisplaySize(vd, display_width, display_height, vd->cfg->is_fullscreen);
+ vout_display_SendEventDisplaySize(vd, display_width, display_height);
return VLC_SUCCESS;
error:
vout_display_sys_t *sys = vd->sys;
if (sys->pool)
- picture_pool_Delete(sys->pool);
+ picture_pool_Release(sys->pool);
if (sys->overlay) {
SDL_LockYUVOverlay(sys->overlay);
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_FULLSCREEN: {
- vout_display_cfg_t cfg = *va_arg(args, const vout_display_cfg_t *);
+ bool fs = va_arg(args, int);
/* Fix flags */
sys->display_flags &= ~(SDL_FULLSCREEN | SDL_RESIZABLE);
- sys->display_flags |= cfg.is_fullscreen ? SDL_FULLSCREEN : SDL_RESIZABLE;
-
- if (cfg.is_fullscreen) {
- cfg.display.width = sys->desktop_width;
- cfg.display.height = sys->desktop_height;
- }
+ sys->display_flags |= fs ? SDL_FULLSCREEN : SDL_RESIZABLE;
- if (sys->overlay) {
- sys->display = SDL_SetVideoMode(cfg.display.width, cfg.display.height,
+ if (sys->overlay)
+ sys->display = SDL_SetVideoMode(sys->desktop_width, sys->desktop_height,
sys->display_bpp, sys->display_flags);
- vout_display_PlacePicture(&sys->place, &vd->source, &cfg, !sys->overlay);
- }
- vout_display_SendEventDisplaySize(vd, cfg.display.width, cfg.display.height, cfg.is_fullscreen);
+ vout_display_SendEventDisplaySize(vd, sys->desktop_width, sys->desktop_height);
return VLC_SUCCESS;
}
case VOUT_DISPLAY_CHANGE_ZOOM:
/* */
if (sys->pool)
- picture_pool_Delete(sys->pool);
+ picture_pool_Release(sys->pool);
sys->pool = NULL;
vout_display_PlacePicture(&sys->place, &vd->source, vd->cfg, !sys->overlay);
}
case SDL_VIDEORESIZE:
- vout_display_SendEventDisplaySize(vd, event.resize.w, event.resize.h, vd->cfg->is_fullscreen);
+ vout_display_SendEventDisplaySize(vd, event.resize.w, event.resize.h);
break;
default: