Roderick Colenbrander : wgl: Fix wglGetPixelFormatAttribiv bug.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Dec 28 07:40:24 CST 2006


Module: wine
Branch: master
Commit: 8da7b13343edfa479f02d7e545c18acf2687d7f8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8da7b13343edfa479f02d7e545c18acf2687d7f8

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Wed Dec 27 22:01:37 2006 +0100

wgl: Fix wglGetPixelFormatAttribiv bug.

---

 dlls/winex11.drv/opengl.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index cb7366a..384a29b 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -2572,7 +2572,16 @@ static GLboolean WINAPI X11DRV_wglGetPix
                 FIXME("unsupported %x WGL Attribute\n", curWGLAttr);
         }
 
-        if (0 != curGLXAttr) {
+        /* Retrieve a GLX FBConfigAttrib when the attribute to query is valid and
+         * iPixelFormat != 0. When iPixelFormat is 0 the only value which makes
+         * sense to query is WGL_NUMBER_PIXEL_FORMATS_ARB.
+         *
+         * TODO: properly test the behavior of wglGetPixelFormatAttrib*v on Windows
+         *       and check which options can work using iPixelFormat=0 and which not.
+         *       A problem would be that this function is an extension. This would
+         *       mean that the behavior could differ between different vendors (ATI, Nvidia, ..).
+         */
+        if (0 != curGLXAttr && iPixelFormat != 0) {
             /* Check if the format is supported by checking if iPixelFormat isn't larger than the max number of 
             * supported WGLFormats and also check if the GLX fmt_index is valid. */
             if((iPixelFormat > 0) && ((iPixelFormat > nWGLFormats) || (fmt_index > nCfgs))) goto pix_error;




More information about the wine-cvs mailing list