1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 07:12:39 +00:00

wayland: Fallback to any GL version if 3.0 is not supported

This fixes playback on Wayland with older GPUs.
This commit is contained in:
Michael Forney 2013-07-19 04:30:23 -07:00
parent 3dc063a330
commit 906315f075

View File

@ -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);