summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-01-04 15:33:52 +0100
committerwm4 <wm4@nowhere>2014-01-06 20:22:03 +0100
commit0cf2df38d1775d854b4914371e0d73385f11aee0 (patch)
treeb7a53693abec68a9c5f93f73ff3b3aba706149f9
parent4326fdfe2addce63eae1cb56d29c7df5fea9fc20 (diff)
downloadmpv-0cf2df38d1775d854b4914371e0d73385f11aee0.tar.bz2
mpv-0cf2df38d1775d854b4914371e0d73385f11aee0.tar.xz
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.
-rw-r--r--video/out/gl_wayland.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/gl_wayland.c b/video/out/gl_wayland.c
index 9fea33b28f..75f29632b0 100644
--- a/video/out/gl_wayland.c
+++ b/video/out/gl_wayland.c
@@ -106,10 +106,6 @@ static bool egl_create_context(struct vo_wayland_state *wl,
EGLint context_attribs[] = {
EGL_CONTEXT_MAJOR_VERSION_KHR,
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
};
@@ -125,6 +121,8 @@ static bool egl_create_context(struct vo_wayland_state *wl,
context_attribs);
if (!egl_ctx->egl.ctx) {
/* 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;
egl_ctx->egl.ctx = eglCreateContext(egl_ctx->egl.dpy,
egl_ctx->egl.conf,