Commit 07946382 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

opengl32: Don't fail with both PFD_DOUBLEBUFFER_DONTCARE and PFD_STEREO_DONTCARE.

parent 53ac5199
...@@ -277,7 +277,7 @@ static void test_choosepixelformat(void) ...@@ -277,7 +277,7 @@ static void test_choosepixelformat(void)
pfd.dwFlags |= PFD_DOUBLEBUFFER_DONTCARE; pfd.dwFlags |= PFD_DOUBLEBUFFER_DONTCARE;
ok( test_pfd(&pfd), "PFD_DOUBLEBUFFER_DONTCARE failed\n" ); ok( test_pfd(&pfd), "PFD_DOUBLEBUFFER_DONTCARE failed\n" );
pfd.dwFlags |= PFD_STEREO_DONTCARE; pfd.dwFlags |= PFD_STEREO_DONTCARE;
todo_wine ok( test_pfd(&pfd), "PFD_DOUBLEBUFFER_DONTCARE|PFD_STEREO_DONTCARE failed\n" ); ok( test_pfd(&pfd), "PFD_DOUBLEBUFFER_DONTCARE|PFD_STEREO_DONTCARE failed\n" );
pfd.dwFlags &= ~PFD_DOUBLEBUFFER_DONTCARE; pfd.dwFlags &= ~PFD_DOUBLEBUFFER_DONTCARE;
ok( test_pfd(&pfd), "PFD_STEREO_DONTCARE failed\n" ); ok( test_pfd(&pfd), "PFD_STEREO_DONTCARE failed\n" );
pfd.dwFlags &= ~PFD_STEREO_DONTCARE; pfd.dwFlags &= ~PFD_STEREO_DONTCARE;
......
...@@ -517,6 +517,8 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd) ...@@ -517,6 +517,8 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
if (bestDBuffer != -1 && (format.dwFlags & PFD_DOUBLEBUFFER) != bestDBuffer) continue; if (bestDBuffer != -1 && (format.dwFlags & PFD_DOUBLEBUFFER) != bestDBuffer) continue;
} }
else if (!best_format)
goto found;
/* Stereo, see the comments above. */ /* Stereo, see the comments above. */
if (!(ppfd->dwFlags & PFD_STEREO_DONTCARE)) if (!(ppfd->dwFlags & PFD_STEREO_DONTCARE))
...@@ -527,6 +529,8 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd) ...@@ -527,6 +529,8 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd)
if (bestStereo != -1 && (format.dwFlags & PFD_STEREO) != bestStereo) continue; if (bestStereo != -1 && (format.dwFlags & PFD_STEREO) != bestStereo) continue;
} }
else if (!best_format)
goto found;
/* Below we will do a number of checks to select the 'best' pixelformat. /* Below we will do a number of checks to select the 'best' pixelformat.
* We assume the precedence cColorBits > cAlphaBits > cDepthBits > cStencilBits -> cAuxBuffers. * We assume the precedence cColorBits > cAlphaBits > cDepthBits > cStencilBits -> cAuxBuffers.
......
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