1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-30 19:52:14 +00:00

gl_x11: change error message when GL3 context creation fails

On systems that provide legacy OpenGL (up to 2.1), but not GL3 and
later, creating a GL3 context will fail. We then revert to legacy GL.

Apparently the error message printed when the GL3 context creation
fails is confusing. We could just silence it, but there's still a X
error ("X11 error: GLXBadFBConfig"), which would be quite hard to
filter out. For one, it would require messing with the X11 error
handler, which doesn't even carry a context pointer (for application
private data), so we don't even want to touch it. Instead, change
the error message to inform the user what's actually happening: a
fallback to an older version of OpenGL.
This commit is contained in:
wm4 2013-10-28 23:43:07 +01:00
parent dceccaf169
commit 884b4600a4

View File

@ -123,7 +123,7 @@ static bool create_context_x11_gl3(struct MPGLContext *ctx, bool debug)
glx_ctx->fbc, 0, True,
context_attribs);
if (!context) {
MP_FATAL(vo, "Could not create GLX context!\n");
MP_ERR(vo, "Could not create GL3 context. Retrying with legacy context.\n");
return false;
}