diff options
author | wm4 <wm4@nowhere> | 2015-11-06 21:20:23 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-06 21:20:23 +0100 |
commit | b984ec52aaf569a9be4acfe6fdd056f309a3b40e (patch) | |
tree | 46bf89c2b9e697b4f68f3b34eda4b053e15ad068 /video/out/opengl | |
parent | 9693e0f57ac75bd5c5d8313dd933989dd3e64d31 (diff) |
vo_opengl: x11: silence error messages when using legacy GL context
glXCreateContextAttribsARB() by design can throw some X11 errors. We
ignore these, but we generally still print error messages to the
terminal. This was confusing/annoying users, so silence it. The stupid
part is that the Xlib error handler is global, so we have to be slightly
careful here.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/x11.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/x11.c b/video/out/opengl/x11.c index 4d7efbac90..16d674c802 100644 --- a/video/out/opengl/x11.c +++ b/video/out/opengl/x11.c @@ -112,11 +112,13 @@ static bool create_context_x11_gl3(struct MPGLContext *ctx, int vo_flags, GLX_CONTEXT_FLAGS_ARB, ctx_flags, None }; + vo_x11_silence_xlib(1); GLXContext context = glXCreateContextAttribsARB(vo->x11->display, glx_ctx->fbc, 0, True, context_attribs); + vo_x11_silence_xlib(-1); if (!context) { - MP_INFO(vo, "Could not create GL3 context. Retrying with legacy context.\n"); + MP_VERBOSE(vo, "Could not create GL3 context. Retrying with legacy context.\n"); return false; } |