summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2013-07-19 04:30:23 -0700
committerMichael Forney <mforney@mforney.org>2013-07-19 04:30:23 -0700
commit906315f075994387b8724a3b2a87bad45b86f6f9 (patch)
tree41fca9075826a31c556c27560eb186a9627da0cc /video
parent3dc063a3308e2f3e2a1a94f2a6b1c58e64a757bb (diff)
downloadmpv-906315f075994387b8724a3b2a87bad45b86f6f9.tar.bz2
mpv-906315f075994387b8724a3b2a87bad45b86f6f9.tar.xz
wayland: Fallback to any GL version if 3.0 is not supported
This fixes playback on Wayland with older GPUs.
Diffstat (limited to 'video')
-rw-r--r--video/out/gl_wayland.c13
1 files 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);