mirror of
https://github.com/wine-mirror/wine
synced 2024-07-01 07:14:31 +00:00
opengl32: Prefer formats with depth if unspecified in wglChoosePixelFormat().
This commit is contained in:
parent
bdba9407d9
commit
6a31983779
|
@ -326,6 +326,7 @@ static void test_choosepixelformat(void)
|
|||
ok( ret_fmt.cAlphaShift == 24, "Got %u.\n", ret_fmt.cAlphaShift );
|
||||
else
|
||||
ok( !ret_fmt.cAlphaShift, "Got %u.\n", ret_fmt.cAlphaShift );
|
||||
ok( ret_fmt.cDepthBits, "Got %u.\n", ret_fmt.cDepthBits );
|
||||
|
||||
pfd.dwFlags |= PFD_DOUBLEBUFFER_DONTCARE;
|
||||
ok( test_pfd(&pfd, NULL), "PFD_DOUBLEBUFFER_DONTCARE failed\n" );
|
||||
|
|
|
@ -284,7 +284,14 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (ppfd->dwFlags & PFD_DEPTH_DONTCARE && format.cDepthBits < best.cDepthBits)
|
||||
if (ppfd->dwFlags & PFD_DEPTH_DONTCARE)
|
||||
{
|
||||
if (format.cDepthBits < best.cDepthBits)
|
||||
goto found;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!ppfd->cDepthBits && format.cDepthBits > best.cDepthBits)
|
||||
goto found;
|
||||
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue
Block a user