From d62e5874a93095504438b40dd4a4ac9d58961861 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Fri, 19 Apr 2013 19:06:15 +0200 Subject: [PATCH] winex11.drv: Print the error in wglCreateContextAttribsARB() when context creation fails. --- dlls/winex11.drv/opengl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 2313eca1b79..6dd07fa40d8 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; } -- 2.11.4.GIT