Matteo Bruni : winex11.drv: Fix wglCreateContextAttribsARB' s attributes handling for real.

Alexandre Julliard julliard at winehq.org
Fri May 31 14:34:13 CDT 2013


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

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Fri May 31 14:52:21 2013 +0200

winex11.drv: Fix wglCreateContextAttribsARB's attributes handling for real.

---

 dlls/winex11.drv/opengl.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 05b8f60..cd24575 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1945,7 +1945,6 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg
         ret->fmt = gl->format;
         ret->vis = NULL; /* glXCreateContextAttribsARB requires a fbconfig instead of a visual */
         ret->gl3_context = TRUE;
-        ret->numAttribs = 0;
         if (attribList)
         {
             int *pContextAttribList = &ret->attribList[0];
@@ -1959,11 +1958,13 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg
                     pContextAttribList[0] = GLX_CONTEXT_MAJOR_VERSION_ARB;
                     pContextAttribList[1] = attribList[1];
                     pContextAttribList += 2;
+                    ret->numAttribs++;
                     break;
                 case WGL_CONTEXT_MINOR_VERSION_ARB:
                     pContextAttribList[0] = GLX_CONTEXT_MINOR_VERSION_ARB;
                     pContextAttribList[1] = attribList[1];
                     pContextAttribList += 2;
+                    ret->numAttribs++;
                     break;
                 case WGL_CONTEXT_LAYER_PLANE_ARB:
                     break;
@@ -1971,16 +1972,17 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg
                     pContextAttribList[0] = GLX_CONTEXT_FLAGS_ARB;
                     pContextAttribList[1] = attribList[1];
                     pContextAttribList += 2;
+                    ret->numAttribs++;
                     break;
                 case WGL_CONTEXT_PROFILE_MASK_ARB:
                     pContextAttribList[0] = GLX_CONTEXT_PROFILE_MASK_ARB;
                     pContextAttribList[1] = attribList[1];
                     pContextAttribList += 2;
+                    ret->numAttribs++;
                     break;
                 default:
                     ERR("Unhandled attribList pair: %#x %#x\n", attribList[0], attribList[1]);
                 }
-                ret->numAttribs++;
                 attribList += 2;
             }
         }




More information about the wine-cvs mailing list