CreateBitmap() fix

Erik Inge Bolsø knan at mo.himolde.no
Sat Dec 1 19:45:10 CST 2001


As documented at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_3ak0.asp
, CreateBitmap can take nHeight or nWidth = zero, and then returns a
pointer to a 1x1 monochrome bitmap.

Needed by Civilization III.

Index: objects/bitmap.c
===================================================================
RCS file: /home/wine/wine/objects/bitmap.c,v
retrieving revision 1.44
diff -u -u -r1.44 bitmap.c
--- objects/bitmap.c	25 Jul 2001 00:43:36 -0000	1.44
+++ objects/bitmap.c	1 Dec 2001 19:52:07 -0000
@@ -110,7 +110,7 @@


       /* Check parameters */
-    if (!height || !width) return 0;
+    if (!height || !width) { height = 1; width = 1; bpp = 1; }
     if (planes != 1) {
         FIXME("planes = %d\n", planes);
 	return 0;

--
Erik I. Bolsø | email: <knan at mo.himolde.no>
The UNIX philosophy basically involves giving you enough rope to
hang yourself.  And then a couple of feet more, just to be sure.





More information about the wine-patches mailing list