Commit 075f8cfe authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

Fix X11DRV_ChoosePixelFormat to choose 24 bpp as 32 bpp for depth

buffers (needed as many X11 drivers only support 24bpp).
parent 5e1b4185
......@@ -203,7 +203,15 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
if (ppfd->iPixelType == PFD_TYPE_RGBA) {
ADD2(GLX_RENDER_TYPE, GLX_RGBA_BIT);
ADD2(GLX_BUFFER_SIZE, ppfd->cColorBits);
if (32 == ppfd->cDepthBits) {
/**
* for 32 bpp depth buffers force to use 24.
* needed as some drivers don't support 32bpp
*/
TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, 24);
} else {
TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, ppfd->cDepthBits);
}
TEST_AND_ADD2(ppfd->cAlphaBits, GLX_ALPHA_SIZE, ppfd->cAlphaBits);
}
TEST_AND_ADD2(ppfd->cStencilBits, GLX_STENCIL_SIZE, ppfd->cStencilBits);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment