From 580d7c9be352fc78d9d83925cfa57880eb17e113 Mon Sep 17 00:00:00 2001 From: Rob McClinton Date: Tue, 16 Jul 2002 01:13:55 +0000 Subject: [PATCH] X11DRV_GetDIBits: Don't clear the biCompression==BI_BITFIELDS flag after creating the bits. --- graphics/x11drv/dib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index 6dbe11bdfd4..3fc14d7935f 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c @@ -5043,13 +5043,18 @@ INT X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan, info->bmiHeader.biHeight, info->bmiHeader.biBitCount ); - info->bmiHeader.biCompression = 0; if (descr.compression == BI_BITFIELDS) { *(DWORD *)info->bmiColors = descr.rMask; *((DWORD *)info->bmiColors+1) = descr.gMask; *((DWORD *)info->bmiColors+2) = descr.bMask; } + else + { + /* if RLE or JPEG compression were supported, + * this line would be invalid. */ + info->bmiHeader.biCompression = 0; + } done: GDI_ReleaseObj( dc->hPalette );