diff options
author | Morgan Armand <[email protected]> | 2011-11-02 20:12:39 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-11-02 19:51:09 +0000 |
commit | c7fc4067ebd4758dd7566b20169a428dc8926c8d (patch) | |
tree | af703d75e2b7846091a2ab2fba1200358cf61652 /src/mesa/drivers/windows/gdi/wgl.c | |
parent | 0be1f797709528546f17f82e67b86181fa0c61e1 (diff) |
wglSetPixelFormat should ignore the ppfd parameter.
Signed-off-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/drivers/windows/gdi/wgl.c')
-rw-r--r-- | src/mesa/drivers/windows/gdi/wgl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/drivers/windows/gdi/wgl.c b/src/mesa/drivers/windows/gdi/wgl.c index 33baabee63f..61850c26ffb 100644 --- a/src/mesa/drivers/windows/gdi/wgl.c +++ b/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); } |