Joshua Beck : winex11: Improved error handling in pglXMakeCurrent() call.

Alexandre Julliard julliard at winehq.org
Thu Apr 7 07:37:08 CDT 2011


Module: wine
Branch: stable
Commit: 12a6603136230223e2386aae033fe1e54c9f33e1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=12a6603136230223e2386aae033fe1e54c9f33e1

Author: Joshua Beck <jxb091000 at utdallas.edu>
Date:   Thu Mar 24 01:50:33 2011 -0500

winex11: Improved error handling in pglXMakeCurrent() call.
(cherry picked from commit ddada6753836faac170b9613b1d237d937b41ed6)

---

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

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index fec5cd9..73d3b69 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -343,8 +343,11 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
     else
         win = root;
 
-    pglXMakeCurrent(gdi_display, win, ctx);
-
+    if(pglXMakeCurrent(gdi_display, win, ctx) == 0)
+    {
+        ERR_(winediag)( "Unable to activate OpenGL context, most likely your OpenGL drivers haven't been installed correctly\n" );
+        goto done;
+    }
     WineGLInfo.glVersion = (const char *) pglGetString(GL_VERSION);
     str = (const char *) pglGetString(GL_EXTENSIONS);
     WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);




More information about the wine-cvs mailing list