Vitaliy Margolen : x11drv: Fix one case of "glXChooseFBConfig returns
NULL" problem.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Mar 15 05:11:54 CST 2006
Module: wine
Branch: refs/heads/master
Commit: c04cbbfeae627cc20b55972df12f5dcc437ab10e
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c04cbbfeae627cc20b55972df12f5dcc437ab10e
Author: Vitaliy Margolen <wine-patch at kievinfo.com>
Date: Sat Mar 4 22:27:11 2006 -0700
x11drv: Fix one case of "glXChooseFBConfig returns NULL" problem.
Using alpha bits > 8 makes this function fail, while it should not.
---
dlls/x11drv/opengl.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/x11drv/opengl.c b/dlls/x11drv/opengl.c
index eb58da9..3fc0231 100644
--- a/dlls/x11drv/opengl.c
+++ b/dlls/x11drv/opengl.c
@@ -226,7 +226,8 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEV
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);
More information about the wine-cvs
mailing list