dibs: better depth selection for dibsection bitmaps
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Fri Sep 10 09:06:56 CDT 2004
Huw Davies <huw at codeweavers.com>
We want all 1bpp dibsections to have a monochrome bitmap
and everything else to the be at the screen depth.
--
Huw Davies
huw at codeweavers.com
Index: dlls/x11drv/dib.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/dib.c,v
retrieving revision 1.15
diff -u -r1.15 dib.c
--- dlls/x11drv/dib.c 13 Aug 2004 19:47:29 -0000 1.15
+++ dlls/x11drv/dib.c 10 Sep 2004 14:03:03 -0000
@@ -4647,7 +4647,9 @@
/* Create Device Dependent Bitmap and add DIB pointer */
if (dib)
{
- res = CreateDIBitmap(physDev->hdc, bi, 0, NULL, bmi, usage);
+ int depth = (bi->biBitCount == 1) ? 1 : GetDeviceCaps(physDev->hdc, BITSPIXEL);
+ res = CreateBitmap(bi->biWidth, effHeight, 1, depth, NULL);
+
if (res)
{
bmp = (BITMAPOBJ *) GDI_GetObjPtr(res, BITMAP_MAGIC);
More information about the wine-patches
mailing list