Buggy Xrender avoidance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	CodeWeavers
	Detect and warn about buggy versions of libXrender
-- 
Huw Davies
huw@codeweavers.com
Index: dlls/x11drv/xrender.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/xrender.c,v
retrieving revision 1.6
diff -u -r1.6 xrender.c
--- dlls/x11drv/xrender.c	3 Apr 2002 22:08:27 -0000	1.6
+++ dlls/x11drv/xrender.c	2 May 2002 08:27:58 -0000
@@ -95,6 +95,14 @@
         X11DRV_XRender_Installed = TRUE;
 	TRACE("Xrender is up and running error_base = %d\n", error_base);
 	screen_format = TSXRenderFindVisualFormat(gdi_display, visual);
+	if(!screen_format) { /* This fails in buggy versions of libXrender.so */
+	    WINE_MESSAGE(
+	     "Wine has detected that you probably have a buggy version\n"
+	     "of libXrender.so .  Because of this client side font rendering\n"
+	     "will be disabled.  Please upgrade this library.\n");
+	    X11DRV_XRender_Installed = FALSE;
+	    return;
+	};
 	pf.type = PictTypeDirect;
 	pf.depth = 1;
 	pf.direct.alpha = 0;
@@ -102,7 +110,11 @@
 	mono_format = TSXRenderFindFormat(gdi_display, PictFormatType |
 					  PictFormatDepth | PictFormatAlpha |
 					  PictFormatAlphaMask, &pf, 0);
-
+	if(!mono_format) {
+	    ERR("mono_format == NULL?\n");
+	    X11DRV_XRender_Installed = FALSE;
+	    return;
+	}
 	glyphsetCache = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
 				  sizeof(*glyphsetCache) * INIT_CACHE_SIZE);
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux