Matteo Bruni : winex11.drv: Print the error in wglCreateContextAttribsARB() when context creation fails.

Alexandre Julliard julliard at winehq.org
Mon Apr 22 14:29:19 CDT 2013


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

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Fri Apr 19 19:06:15 2013 +0200

winex11.drv: Print the error in wglCreateContextAttribsARB() when context creation fails.

---

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

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 2313eca..6dd07fa 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1925,6 +1925,7 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg
 {
     struct wgl_context *ret = NULL;
     struct gl_drawable *gl;
+    int err = 0;
 
     TRACE("(%p %p %p)\n", hdc, hShareContext, attribList);
 
@@ -1983,10 +1984,10 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg
         X11DRV_expect_error(gdi_display, GLXErrorHandler, NULL);
         ret->ctx = create_glxcontext(gdi_display, ret, NULL);
         XSync(gdi_display, False);
-        if (X11DRV_check_error() || !ret->ctx)
+        if ((err = X11DRV_check_error()) || !ret->ctx)
         {
             /* In the future we should convert the GLX error to a win32 one here if needed */
-            ERR("Context creation failed\n");
+            ERR("Context creation failed (error %x)\n", err);
             HeapFree( GetProcessHeap(), 0, ret );
             ret = NULL;
         }




More information about the wine-cvs mailing list