From 77b12d6d18d46f0c420aee48ca5f8d86757eed52 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 29 Mar 2009 00:25:47 +0000 Subject: [PATCH] Patch by Evgeniy Boltik: Always calculate a palette for the DIB in NtGdiGetDIBitsInternal, when dealing with 15 or 16 bit depth. Fixes broken taskbar icons on 16bpp. svn path=/trunk/; revision=40276 --- reactos/subsystems/win32/win32k/objects/dibobj.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/subsystems/win32/win32k/objects/dibobj.c b/reactos/subsystems/win32/win32k/objects/dibobj.c index 232948d7a9a..e59bf9dce25 100644 --- a/reactos/subsystems/win32/win32k/objects/dibobj.c +++ b/reactos/subsystems/win32/win32k/objects/dibobj.c @@ -659,8 +659,10 @@ NtGdiGetDIBitsInternal(HDC hDC, ColorPtr = ((PBYTE)Info + Info->bmiHeader.biSize); rgbQuads = (RGBQUAD *)ColorPtr; - /* Copy palette information */ - if (Info->bmiHeader.biBitCount == BitsPerFormat(psurf->SurfObj.iBitmapFormat)) + /* Copy palette information + * Always create a palette for 15 & 16 bit. */ + if (Info->bmiHeader.biBitCount == BitsPerFormat(psurf->SurfObj.iBitmapFormat) && + Info->bmiHeader.biBitCount != 15 && Info->bmiHeader.biBitCount != 16) { hDestPalette = hSourcePalette; bPaletteMatch = TRUE;