Fix a small OpenGL problem

Lionel Ulmer lionel.ulmer at free.fr
Fri May 24 15:03:57 CDT 2002


Changelog:
 - support querrying of number of visuals without reporting an error or
   crashing

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: graphics/x11drv/opengl.c
===================================================================
RCS file: /home/wine/wine/graphics/x11drv/opengl.c,v
retrieving revision 1.8
diff -u -r1.8 opengl.c
--- graphics/x11drv/opengl.c	11 Apr 2002 23:48:42 -0000	1.8
+++ graphics/x11drv/opengl.c	24 May 2002 20:02:59 -0000
@@ -176,6 +176,11 @@
   int rb,gb,bb,ab;
   
   TRACE("(%p,%d,%d,%p)\n", physDev, iPixelFormat, nBytes, ppfd);
+
+  if (ppfd == NULL) {
+    /* The application is only querying the number of visuals */
+    return MAX_PIXELFORMATS;
+  }
   
   if (nBytes < sizeof(PIXELFORMATDESCRIPTOR)) {
     ERR("Wrong structure size !\n");


More information about the wine-patches mailing list