https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c3e4b5fec6ff51e04e95c…
commit c3e4b5fec6ff51e04e95c3c6908b1b99aee49023
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Tue Jan 15 17:25:05 2019 +0100
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Sat Jan 19 14:23:54 2019 +0100
[OPENGL32] Fix wglChoosePixelFormat
Not asking for a feature is not asking not to have it.
---
dll/opengl/opengl32/wgl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dll/opengl/opengl32/wgl.c b/dll/opengl/opengl32/wgl.c
index 213b8b4076..92d62e91b7 100644
--- a/dll/opengl/opengl32/wgl.c
+++ b/dll/opengl/opengl32/wgl.c
@@ -205,28 +205,28 @@ INT WINAPI wglChoosePixelFormat(HDC hdc, const
PIXELFORMATDESCRIPTOR* ppfd)
}
/* only use bitmap capable formats for bitmap rendering */
- if ((ppfd->dwFlags & PFD_DRAW_TO_BITMAP) != (format.dwFlags &
PFD_DRAW_TO_BITMAP))
+ if ((ppfd->dwFlags & PFD_DRAW_TO_BITMAP) && !(format.dwFlags &
PFD_DRAW_TO_BITMAP))
{
TRACE( "PFD_DRAW_TO_BITMAP mismatch for iPixelFormat=%d\n", i );
continue;
}
/* only use window capable formats for window rendering */
- if ((ppfd->dwFlags & PFD_DRAW_TO_WINDOW) != (format.dwFlags &
PFD_DRAW_TO_WINDOW))
+ if ((ppfd->dwFlags & PFD_DRAW_TO_WINDOW) && !(format.dwFlags &
PFD_DRAW_TO_WINDOW))
{
TRACE( "PFD_DRAW_TO_WINDOW mismatch for iPixelFormat=%d\n", i );
continue;
}
/* only use opengl capable formats for opengl rendering */
- if ((ppfd->dwFlags & PFD_SUPPORT_OPENGL) != (format.dwFlags &
PFD_SUPPORT_OPENGL))
+ if ((ppfd->dwFlags & PFD_SUPPORT_OPENGL) && !(format.dwFlags &
PFD_SUPPORT_OPENGL))
{
TRACE( "PFD_SUPPORT_OPENGL mismatch for iPixelFormat=%d\n", i );
continue;
}
/* only use GDI capable formats for GDI rendering */
- if ((ppfd->dwFlags & PFD_SUPPORT_GDI) != (format.dwFlags &
PFD_SUPPORT_GDI))
+ if ((ppfd->dwFlags & PFD_SUPPORT_GDI) && !(format.dwFlags &
PFD_SUPPORT_GDI))
{
TRACE( "PFD_SUPPORT_GDI mismatch for iPixelFormat=%d\n", i );
continue;