diff options
-rw-r--r-- | src/glx/mini/miniglx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/glx/mini/miniglx.c b/src/glx/mini/miniglx.c index d751c2efa5c..43889964a5c 100644 --- a/src/glx/mini/miniglx.c +++ b/src/glx/mini/miniglx.c @@ -1543,15 +1543,15 @@ glXChooseVisual( Display *dpy, int screen, int *attribList ) attrib++; break; case GLX_GREEN_SIZE: - redBits = attrib[1]; + greenBits = attrib[1]; attrib++; break; case GLX_BLUE_SIZE: - redBits = attrib[1]; + blueBits = attrib[1]; attrib++; break; case GLX_ALPHA_SIZE: - redBits = attrib[1]; + alphaBits = attrib[1]; attrib++; break; case GLX_STENCIL_SIZE: @@ -1603,6 +1603,7 @@ glXChooseVisual( Display *dpy, int screen, int *attribList ) for (i = 0; i < dpy->numModes; i++) { const __GLcontextModes *mode = dpy->modes + i; if (mode->rgbMode == rgbFlag && + (mode->redBits+mode->greenBits+mode->blueBits+mode->alphaBits) == dpy->driverContext.bpp && mode->redBits >= redBits && mode->greenBits >= greenBits && mode->blueBits >= blueBits && |