Commit 3900a730 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

gl: remove hard-coded platform to window type mappings

This should fix compilation on non-Apple Darwin and plausibly addresses
hypothetical future support for Mesa's shared GLAPI.
parent a8906812
...@@ -97,37 +97,28 @@ static int Control (vout_display_t *, int, va_list); ...@@ -97,37 +97,28 @@ static int Control (vout_display_t *, int, va_list);
static vout_window_t *MakeWindow (vout_display_t *vd) static vout_window_t *MakeWindow (vout_display_t *vd)
{ {
vout_window_cfg_t wnd_cfg; vout_window_cfg_t cfg = {
.x = var_InheritInteger (vd, "video-x"),
memset (&wnd_cfg, 0, sizeof (wnd_cfg)); .y = var_InheritInteger (vd, "video-y"),
.width = vd->cfg->display.width,
/* Please keep this in sync with egl.c */ .height = vd->cfg->display.height,
/* <EGL/eglplatform.h> defines the list and order of platforms */ };
#if defined(_WIN32) || defined(__VC32__) \ vout_window_t *wnd;
&& !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
wnd_cfg.type = VOUT_WINDOW_TYPE_HWND; #ifdef _WIN32
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ cfg.type = VOUT_WINDOW_TYPE_HWND;
# warning Symbian not supported. wnd = vout_display_NewWindow (vd, &cfg);
#elif defined(WL_EGL_PLATFORM) if (wnd != NULL)
# error Wayland not supported. return wnd;
#elif defined(__GBM__)
# error Glamor not supported.
#elif defined(ANDROID)
# error Android not supported.
#elif defined(__unix__) /* X11 */
wnd_cfg.type = VOUT_WINDOW_TYPE_XID;
#else
# error Platform not recognized.
#endif #endif
wnd_cfg.x = var_InheritInteger (vd, "video-x");
wnd_cfg.y = var_InheritInteger (vd, "video-y");
wnd_cfg.width = vd->cfg->display.width;
wnd_cfg.height = vd->cfg->display.height;
vout_window_t *wnd = vout_display_NewWindow (vd, &wnd_cfg); cfg.type = VOUT_WINDOW_TYPE_XID;
if (wnd == NULL) wnd = vout_display_NewWindow (vd, &cfg);
msg_Err (vd, "parent window not available"); if (wnd != NULL)
return wnd; return wnd;
msg_Err (vd, "parent window not available");
return NULL;
} }
/** /**
......
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