x11drv: Fix one case of "glXChooseFBConfig returns NULL" problem.

Using alpha bits > 8 makes this function fail, while it should not.
This commit is contained in:
Vitaliy Margolen 2006-03-04 22:27:11 -07:00 committed by Alexandre Julliard
parent 883e0b0edc
commit c04cbbfeae
1 changed files with 2 additions and 1 deletions

View File

@ -226,7 +226,8 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
ADD2(GLX_ALPHA_SIZE, 8);
} else {
ADD2(GLX_BUFFER_SIZE, ppfd->cColorBits);
TEST_AND_ADD2(ppfd->cAlphaBits, GLX_ALPHA_SIZE, ppfd->cAlphaBits);
/* Some broken apps try to ask for more than 8 bits of alpha */
TEST_AND_ADD2(ppfd->cAlphaBits, GLX_ALPHA_SIZE, min(ppfd->cAlphaBits,8));
}
}
TEST_AND_ADD2(ppfd->cStencilBits, GLX_STENCIL_SIZE, ppfd->cStencilBits);