From: Brian Paul Date: Fri, 2 Oct 2009 13:51:15 +0000 (-0600) Subject: xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=584b0879ac2ec2420ea6866e47eb90e1a980e758;p=mesa.git xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual() The parameter is a bitmask. --- diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index eb7c4f6417c..6449dc88b0d 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1197,10 +1197,10 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig ) if (!fbConfig) return NULL; parselist++; - if (*parselist == GLX_RGBA_BIT) { + if (*parselist & GLX_RGBA_BIT) { rgb_flag = GL_TRUE; } - else if (*parselist == GLX_COLOR_INDEX_BIT) { + else if (*parselist & GLX_COLOR_INDEX_BIT) { rgb_flag = GL_FALSE; } else if (*parselist == 0) {