From 906315f075994387b8724a3b2a87bad45b86f6f9 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 19 Jul 2013 04:30:23 -0700 Subject: wayland: Fallback to any GL version if 3.0 is not supported This fixes playback on Wayland with older GPUs. --- video/out/gl_wayland.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/video/out/gl_wayland.c b/video/out/gl_wayland.c index ad97d0b27e..1b5a21ec43 100644 --- a/video/out/gl_wayland.c +++ b/video/out/gl_wayland.c @@ -154,8 +154,17 @@ static bool egl_create_context(struct vo_wayland_state *wl, egl_ctx->egl.conf, EGL_NO_CONTEXT, context_attribs); - if (!egl_ctx->egl.ctx) - return false; + if (!egl_ctx->egl.ctx) { + /* fallback to any GL version */ + context_attribs[0] = EGL_NONE; + egl_ctx->egl.ctx = eglCreateContext(egl_ctx->egl.dpy, + egl_ctx->egl.conf, + EGL_NO_CONTEXT, + context_attribs); + + if (!egl_ctx->egl.ctx) + return false; + } eglMakeCurrent(egl_ctx->egl.dpy, NULL, NULL, egl_ctx->egl.ctx); -- cgit v1.2.3