[Mesa-dev] [PATCH] wglSetPixelFormat should ignore the ppfd parameter
Morgan Armand
morgan.devel at gmail.com
Wed Nov 2 12:22:02 PDT 2011
The patch should be correctly formatted, but I attached it anyway to be sure for this time.
---
src/gallium/state_trackers/wgl/stw_wgl.c | 3 +--
src/mesa/drivers/windows/gdi/wgl.c | 6 +++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/gallium/state_trackers/wgl/stw_wgl.c b/src/gallium/state_trackers/wgl/stw_wgl.c
index 5fbb7bf..2d34a03 100644
--- a/src/gallium/state_trackers/wgl/stw_wgl.c
+++ b/src/gallium/state_trackers/wgl/stw_wgl.c
@@ -172,8 +172,7 @@ wglSetPixelFormat(
int iPixelFormat,
const PIXELFORMATDESCRIPTOR *ppfd )
{
- if (ppfd->nSize != sizeof( PIXELFORMATDESCRIPTOR ))
- return FALSE;
+ (void) ppfd;
return DrvSetPixelFormat( hdc, iPixelFormat );
}
diff --git a/src/mesa/drivers/windows/gdi/wgl.c b/src/mesa/drivers/windows/gdi/wgl.c
index 33baabe..6e78200 100644
--- a/src/mesa/drivers/windows/gdi/wgl.c
+++ b/src/mesa/drivers/windows/gdi/wgl.c
@@ -335,9 +335,9 @@ WINGDIAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc,int iPixelFormat,
const PIXELFORMATDESCRIPTOR *ppfd)
{
(void) hdc;
-
- if(iPixelFormat < 1 || iPixelFormat > npfd ||
- ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR)) {
+ (void) ppfd;
+
+ if(iPixelFormat < 1 || iPixelFormat > npfd) {
SetLastError(0);
return(FALSE);
}
--
1.7.7.1.msysgit.0
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-wglSetPixelFormat-should-ignore-the-ppfd-parameter.patch
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111102/23fae1d0/attachment.ksh>
More information about the mesa-dev
mailing list