summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-02 07:52:27 -0600
committerBrian Paul <[email protected]>2009-10-02 07:52:29 -0600
commit85ee0ef9a72e4ffd6ed0a2442b1272a43508d257 (patch)
treeec16988d7d40eed204df01d57051d820b3c9ea79 /src
parent584b0879ac2ec2420ea6866e47eb90e1a980e758 (diff)
gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
The parameter is a bitmask.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/glx/xlib/glx_api.c4
1 files 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) {