Fix BitBlt

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

 



The game neverwinter nights uses a lot of MaskBlt on its startup screen.
The game was crashing with BadDrawable X error messages.

This was caused by bitblt using the XCopyArea function when there is no
source. Some MaskBlt operations can generate such things, as the list of
different masks on MSDN shows.

ChangeLog:
    * Prevent a crash with a BadDrawable X error message with some
MaskBlt calls.

-- 
Maxime Bellengà <maxime.bellenge@laposte.net>
Index: wine/graphics/x11drv/bitblt.c
===================================================================
RCS file: /home/wine/wine/graphics/x11drv/bitblt.c,v
retrieving revision 1.49
diff -u -r1.49 bitblt.c
--- wine/graphics/x11drv/bitblt.c	8 Oct 2003 02:54:15 -0000	1.49
+++ wine/graphics/x11drv/bitblt.c	14 Oct 2003 16:52:44 -0000
@@ -1504,9 +1504,10 @@
         case OP_ARGS(SRC,DST):
         case OP_ARGS(TMP,SRC):
         case OP_ARGS(TMP,DST):
-            XCopyArea( gdi_display, pixmaps[OP_SRC(*opcode)],
-                       pixmaps[OP_DST(*opcode)], tmpGC,
-                       0, 0, width, height, 0, 0 );
+	    if (useSrc)
+		XCopyArea( gdi_display, pixmaps[OP_SRC(*opcode)],
+			   pixmaps[OP_DST(*opcode)], tmpGC,
+			   0, 0, width, height, 0, 0 );
             break;
 
         case OP_ARGS(PAT,TMP):

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

  Powered by Linux