From 85ee0ef9a72e4ffd6ed0a2442b1272a43508d257 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Oct 2009 07:52:27 -0600 Subject: [PATCH] gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual() The parameter is a bitmask. --- src/gallium/state_trackers/glx/xlib/glx_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.30.2