[PATCH 2/2] wglSetPixelFormat should ignore the ppfd parameter.

Morgan Armand morgan.devel at gmail.com
Wed Nov 2 12:12:39 PDT 2011


---
 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


--------------070908000208090907020309--


More information about the mesa-dev mailing list