From 02f377d5e2dd18537d0807ad63675a0970b5a37d Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 4 Nov 2011 08:57:20 +0100 Subject: xserver pixman mesa git update 4 nov 2011 --- mesalib/src/mesa/drivers/windows/gdi/wgl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mesalib/src/mesa/drivers/windows/gdi/wgl.c') diff --git a/mesalib/src/mesa/drivers/windows/gdi/wgl.c b/mesalib/src/mesa/drivers/windows/gdi/wgl.c index 33baabee6..61850c26f 100644 --- a/mesalib/src/mesa/drivers/windows/gdi/wgl.c +++ b/mesalib/src/mesa/drivers/windows/gdi/wgl.c @@ -335,9 +335,13 @@ WINGDIAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc,int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd) { (void) hdc; - - if(iPixelFormat < 1 || iPixelFormat > npfd || - ppfd->nSize != sizeof(PIXELFORMATDESCRIPTOR)) { + + /* SetPixelFormat (hence wglSetPixelFormat) must not touch ppfd, per + * http://msdn.microsoft.com/en-us/library/dd369049(v=vs.85).aspx + */ + (void) ppfd; + + if(iPixelFormat < 1 || iPixelFormat > npfd) { SetLastError(0); return(FALSE); } -- cgit v1.2.3