mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 19:10:21 +00:00
opengl32: Prioritize stencil check over depth check in wglChoosePixelFormat().
Patch by Matteo Bruni. Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
This commit is contained in:
parent
28ba7e41f8
commit
cc8d8b5ee3
|
@ -564,18 +564,6 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (ppfd->cDepthBits && !(ppfd->dwFlags & PFD_DEPTH_DONTCARE))
|
||||
{
|
||||
if (((ppfd->cDepthBits > best.cDepthBits) && (format.cDepthBits > best.cDepthBits)) ||
|
||||
((format.cDepthBits >= ppfd->cDepthBits) && (format.cDepthBits < best.cDepthBits)))
|
||||
goto found;
|
||||
|
||||
if (best.cDepthBits != format.cDepthBits)
|
||||
{
|
||||
TRACE( "depth mismatch for iPixelFormat=%d\n", i );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (ppfd->cStencilBits)
|
||||
{
|
||||
if (((ppfd->cStencilBits > best.cStencilBits) && (format.cStencilBits > best.cStencilBits)) ||
|
||||
|
@ -588,6 +576,18 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (ppfd->cDepthBits && !(ppfd->dwFlags & PFD_DEPTH_DONTCARE))
|
||||
{
|
||||
if (((ppfd->cDepthBits > best.cDepthBits) && (format.cDepthBits > best.cDepthBits)) ||
|
||||
((format.cDepthBits >= ppfd->cDepthBits) && (format.cDepthBits < best.cDepthBits)))
|
||||
goto found;
|
||||
|
||||
if (best.cDepthBits != format.cDepthBits)
|
||||
{
|
||||
TRACE( "depth mismatch for iPixelFormat=%d\n", i );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (ppfd->cAuxBuffers)
|
||||
{
|
||||
if (((ppfd->cAuxBuffers > best.cAuxBuffers) && (format.cAuxBuffers > best.cAuxBuffers)) ||
|
||||
|
|
Loading…
Reference in a new issue