fix red/green/blueBits typos
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 12 May 2004 14:48:39 +0000 (14:48 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 12 May 2004 14:48:39 +0000 (14:48 +0000)
src/glx/mini/miniglx.c

index d751c2efa5c0f7ec883caf6a8e5219d11bc77fb4..43889964a5c0445915ab1e01f68de73391274af3 100644 (file)
@@ -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 &&