aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/windows/gdi/wgl.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-04 08:57:20 +0100
committermarha <marha@users.sourceforge.net>2011-11-04 08:57:20 +0100
commit02f377d5e2dd18537d0807ad63675a0970b5a37d (patch)
tree1814c826db4d95a30ad71431d9c84b8d2611ec18 /mesalib/src/mesa/drivers/windows/gdi/wgl.c
parent6f4feafd4d22beaabfb0202e66b0dea9047ee084 (diff)
downloadvcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.gz
vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.tar.bz2
vcxsrv-02f377d5e2dd18537d0807ad63675a0970b5a37d.zip
xserver pixman mesa git update 4 nov 2011
Diffstat (limited to 'mesalib/src/mesa/drivers/windows/gdi/wgl.c')
-rw-r--r--mesalib/src/mesa/drivers/windows/gdi/wgl.c10
1 files changed, 7 insertions, 3 deletions
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);
}