From: Paul Gofman pgofman@codeweavers.com
Patch by Matteo Bruni.
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/opengl32/wgl.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index bd7f7d22e98..49f1e4700b4 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -564,27 +564,27 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd) continue; } } - if (ppfd->cDepthBits && !(ppfd->dwFlags & PFD_DEPTH_DONTCARE)) + if (ppfd->cStencilBits) { - if (((ppfd->cDepthBits > best.cDepthBits) && (format.cDepthBits > best.cDepthBits)) || - ((format.cDepthBits >= ppfd->cDepthBits) && (format.cDepthBits < best.cDepthBits))) + if (((ppfd->cStencilBits > best.cStencilBits) && (format.cStencilBits > best.cStencilBits)) || + ((format.cStencilBits >= ppfd->cStencilBits) && (format.cStencilBits < best.cStencilBits))) goto found;
- if (best.cDepthBits != format.cDepthBits) + if (best.cStencilBits != format.cStencilBits) { - TRACE( "depth mismatch for iPixelFormat=%d\n", i ); + TRACE( "stencil mismatch for iPixelFormat=%d\n", i ); continue; } } - if (ppfd->cStencilBits) + if (ppfd->cDepthBits && !(ppfd->dwFlags & PFD_DEPTH_DONTCARE)) { - if (((ppfd->cStencilBits > best.cStencilBits) && (format.cStencilBits > best.cStencilBits)) || - ((format.cStencilBits >= ppfd->cStencilBits) && (format.cStencilBits < best.cStencilBits))) + if (((ppfd->cDepthBits > best.cDepthBits) && (format.cDepthBits > best.cDepthBits)) || + ((format.cDepthBits >= ppfd->cDepthBits) && (format.cDepthBits < best.cDepthBits))) goto found;
- if (best.cStencilBits != format.cStencilBits) + if (best.cDepthBits != format.cDepthBits) { - TRACE( "stencil mismatch for iPixelFormat=%d\n", i ); + TRACE( "depth mismatch for iPixelFormat=%d\n", i ); continue; } }