We want all 1bpp dibsections to have a monochrome bitmap and

everything else to be at the screen depth.
oldstable
Huw Davies 2004-09-10 19:35:56 +00:00 committed by Alexandre Julliard
parent bb2796f9aa
commit ce34568351
1 changed files with 3 additions and 1 deletions

View File

@ -4647,7 +4647,9 @@ HBITMAP X11DRV_DIB_CreateDIBSection(
/* 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);