dibsection: ignore biClr*

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

 



        Huw Davies <huw@xxxxxxxxxxxxxxx>
	CreateDIBSection ignores the supplied values of biClrUsed and
	biClrImportant and calculates them from biBitCount.
-- 
Huw Davies
huw@xxxxxxxxxxxxxxx
Index: objects/dib.c
===================================================================
RCS file: /home/wine/wine/objects/dib.c,v
retrieving revision 1.76
diff -u -r1.76 dib.c
--- objects/dib.c	15 Oct 2003 02:32:00 -0000	1.76
+++ objects/dib.c	10 Nov 2003 16:47:47 -0000
@@ -897,6 +897,12 @@
         bDesktopDC = TRUE;
     }
 
+    /* Windows ignores the supplied values of biClrUsed and biClrImportant thus: */
+    if (bmi->bmiHeader.biBitCount >= 1 && bmi->bmiHeader.biBitCount <= 8)
+        bmi->bmiHeader.biClrUsed = bmi->bmiHeader.biClrImportant = 1L << bmi->bmiHeader.biBitCount;
+    else
+        bmi->bmiHeader.biClrUsed = bmi->bmiHeader.biClrImportant = 0;
+
     if ((dc = DC_GetDCPtr( hdc )))
     {
         hbitmap = dc->funcs->pCreateDIBSection(dc->physDev, bmi, usage, bits, section, offset, ovr_pitch);


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

  Powered by Linux