diff options
Diffstat (limited to 'video/out/opengl/context_x11egl.c')
-rw-r--r-- | video/out/opengl/context_x11egl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/video/out/opengl/context_x11egl.c b/video/out/opengl/context_x11egl.c index 321df4039d..f1596bcee4 100644 --- a/video/out/opengl/context_x11egl.c +++ b/video/out/opengl/context_x11egl.c @@ -148,9 +148,12 @@ static bool mpegl_init(struct ra_ctx *ctx) XFree(vi); - p->egl_surface = eglCreateWindowSurface(p->egl_display, config, - (EGLNativeWindowType)vo->x11->window, NULL); - + p->egl_surface = mpegl_create_window_surface( + p->egl_display, config, &vo->x11->window); + if (p->egl_surface == EGL_NO_SURFACE) { + p->egl_surface = eglCreateWindowSurface( + p->egl_display, config, (EGLNativeWindowType)vo->x11->window, NULL); + } if (p->egl_surface == EGL_NO_SURFACE) { MP_FATAL(ctx, "Could not create EGL surface!\n"); goto uninit; |