From: Brian Paul Date: Fri, 2 Oct 2009 13:52:27 +0000 (-0600) Subject: gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85ee0ef9a72e4ffd6ed0a2442b1272a43508d257;p=mesa.git gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual() The parameter is a bitmask. --- diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index 7f04db2186e..6cd7ede31cf 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -850,10 +850,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) {