From fc48de4fabcf3a42a1cd7d447790afefc7d27af8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Marchesin?= Date: Thu, 26 May 2011 17:19:03 -0700 Subject: [PATCH] glx: Fix glXGetFBConfigFromVisualSGIX. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We want to check for Success, otherwise it will fail even with the right visual. NOTE: This is a candidate for the 7.10 branch. Signed-off-by: Antoine Labour Signed-off-by: Stéphane Marchesin Signed-off-by: Brian Paul --- src/glx/glxcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 012cd79506e..dbfa0edff98 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -1890,7 +1890,7 @@ glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis) struct glx_display *priv; struct glx_screen *psc = NULL; - if ((GetGLXPrivScreenConfig(dpy, vis->screen, &priv, &psc) != Success) + if ((GetGLXPrivScreenConfig(dpy, vis->screen, &priv, &psc) == Success) && __glXExtensionBitIsEnabled(psc, SGIX_fbconfig_bit) && (psc->configs->fbconfigID != (int) GLX_DONT_CARE)) { return (GLXFBConfigSGIX) glx_config_find_visual(psc->configs, -- 2.30.2