mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
wayland: Remove nonsense comment and add warning
The reason a segmentation happend here was because we couldn't get the requested minor version. The major version is enough for differentiating between OpenGL 3 and OpenGL 2. If it fails there is still a fallback to any version available. Also add a warning if we use the fallback.
This commit is contained in:
parent
340ab6cd72
commit
f5565f33c7
@ -106,10 +106,6 @@ static bool egl_create_context(struct vo_wayland_state *wl,
|
|||||||
EGLint context_attribs[] = {
|
EGLint context_attribs[] = {
|
||||||
EGL_CONTEXT_MAJOR_VERSION_KHR,
|
EGL_CONTEXT_MAJOR_VERSION_KHR,
|
||||||
MPGL_VER_GET_MAJOR(ctx->requested_gl_version),
|
MPGL_VER_GET_MAJOR(ctx->requested_gl_version),
|
||||||
/* EGL_CONTEXT_MINOR_VERSION_KHR, */
|
|
||||||
/* MPGL_VER_GET_MINOR(ctx->requested_gl_version), */
|
|
||||||
/* EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR, 0, */
|
|
||||||
/* Segfaults on anything else than the major version */
|
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -125,6 +121,8 @@ static bool egl_create_context(struct vo_wayland_state *wl,
|
|||||||
context_attribs);
|
context_attribs);
|
||||||
if (!egl_ctx->egl.ctx) {
|
if (!egl_ctx->egl.ctx) {
|
||||||
/* fallback to any GL version */
|
/* fallback to any GL version */
|
||||||
|
MP_WARN(wl, "can't create context for requested OpenGL version: "
|
||||||
|
"fall back to any version available");
|
||||||
context_attribs[0] = EGL_NONE;
|
context_attribs[0] = EGL_NONE;
|
||||||
egl_ctx->egl.ctx = eglCreateContext(egl_ctx->egl.dpy,
|
egl_ctx->egl.ctx = eglCreateContext(egl_ctx->egl.dpy,
|
||||||
egl_ctx->egl.conf,
|
egl_ctx->egl.conf,
|
||||||
|
Loading…
Reference in New Issue
Block a user