Commit 6204b259 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

window: remove constant cfg.type member

It's always INVALID now...
parent f87c4ac6
......@@ -96,9 +96,6 @@ typedef struct vout_window_mouse_event_t
} vout_window_mouse_event_t;
typedef struct vout_window_cfg_t {
/* Window handle type */
unsigned type;
/* If true, a standalone window is requested */
bool is_standalone;
bool is_fullscreen;
......
......@@ -46,10 +46,6 @@ static int WindowControl(vout_window_t *, int i_query, va_list);
int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
{
@autoreleasepool {
if (cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != VOUT_WINDOW_TYPE_NSOBJECT)
return VLC_EGENERIC;
msg_Dbg(p_wnd, "Opening video window");
if (!atomic_load(&b_intf_starting)) {
......
......@@ -104,10 +104,6 @@ static int WindowControl(vout_window_t *, int i_query, va_list);
int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
{
if (cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != VOUT_WINDOW_TYPE_NSOBJECT)
return VLC_EGENERIC;
@autoreleasepool {
NSRect proposedVideoViewPosition = NSMakeRect(cfg->x, cfg->y, cfg->width, cfg->height);
......
......@@ -696,10 +696,6 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
return VLC_EGENERIC;
}
if( cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != p_intf->p_sys->voutWindowType )
return VLC_EGENERIC;
switch( p_intf->p_sys->voutWindowType )
{
case VOUT_WINDOW_TYPE_XID:
......
......@@ -347,16 +347,6 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
if( var_InheritBool( pWnd, "video-wallpaper" ) )
return VLC_EGENERIC;
if( cfg->type != VOUT_WINDOW_TYPE_INVALID )
{
#ifdef X11_SKINS
if( cfg->type != VOUT_WINDOW_TYPE_XID )
#else
if( cfg->type != VOUT_WINDOW_TYPE_HWND )
#endif
return VLC_EGENERIC;
}
vout_window_sys_t* sys;
vlc_mutex_lock( &skin_load.mutex );
......
......@@ -87,10 +87,6 @@ static void OnNewMouseCoords(vout_window_t *wnd,
*/
static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
{
if (cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != VOUT_WINDOW_TYPE_ANDROID_NATIVE)
return VLC_EGENERIC;
vout_window_sys_t *p_sys = malloc(sizeof (*p_sys));
if (p_sys == NULL)
return VLC_ENOMEM;
......
......@@ -67,10 +67,6 @@ static uintptr_t *used = NULL;
*/
static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
{
if (cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != VOUT_WINDOW_TYPE_HWND)
return VLC_EGENERIC;
uintptr_t val = var_InheritInteger (wnd, "drawable-hwnd");
if (val == 0)
return VLC_EGENERIC;
......
......@@ -228,10 +228,6 @@ static const struct wl_registry_listener registry_cbs =
*/
static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
{
if (cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != VOUT_WINDOW_TYPE_WAYLAND)
return VLC_EGENERIC;
vout_window_sys_t *sys = malloc(sizeof (*sys));
if (unlikely(sys == NULL))
return VLC_ENOMEM;
......
......@@ -282,10 +282,6 @@ static const struct wl_registry_listener registry_cbs =
*/
static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
{
if (cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != VOUT_WINDOW_TYPE_WAYLAND)
return VLC_EGENERIC;
vout_window_sys_t *sys = malloc(sizeof (*sys));
if (unlikely(sys == NULL))
return VLC_ENOMEM;
......
......@@ -379,10 +379,6 @@ static void CacheAtoms (vout_window_sys_t *p_sys)
*/
static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
{
if (cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != VOUT_WINDOW_TYPE_XID)
return VLC_EGENERIC;
xcb_generic_error_t *err;
xcb_void_cookie_t ck;
......@@ -648,10 +644,6 @@ static void ReleaseDrawable (vlc_object_t *obj, xcb_window_t window)
*/
static int EmOpen (vout_window_t *wnd, const vout_window_cfg_t *cfg)
{
if (cfg->type != VOUT_WINDOW_TYPE_INVALID
&& cfg->type != VOUT_WINDOW_TYPE_XID)
return VLC_EGENERIC;
xcb_window_t window = var_InheritInteger (wnd, "drawable-xid");
if (window == 0)
return VLC_EGENERIC;
......
......@@ -1403,7 +1403,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
const video_splitter_output_t *output = &splitter->p_output[i];
vout_display_state_t ostate;
vout_window_cfg_t cfg = {
.type = VOUT_WINDOW_TYPE_INVALID,
.width = state->cfg.display.width,
.height = state->cfg.display.height,
.is_standalone = true,
......
......@@ -167,7 +167,6 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
vout_window_cfg_t wcfg = {
.is_standalone = !var_InheritBool(vout, "embedded-video"),
.is_fullscreen = var_GetBool(vout, "fullscreen"),
.type = VOUT_WINDOW_TYPE_INVALID,
// TODO: take pixel A/R, crop and zoom into account
#ifdef __APPLE__
.x = var_InheritInteger(vout, "video-x"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment