Author: tkreuzer
Date: Wed Jun 9 18:08:23 2010
New Revision: 47719
URL:
http://svn.reactos.org/svn/reactos?rev=47719&view=rev
Log:
[WIN32K]
If pbmiSrc->bmiHeader.bV5ClrUsed is 0, calculate the number of colors from the bit
depth. Fixes black taskbar icons with vbox driver on 8 bpp
Modified:
branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Wed
Jun 9 18:08:23 2010
@@ -1951,15 +1951,21 @@
else
{
INT i;
+ ULONG cColorsUsed;
+
+ cColorsUsed = pbmiSrc->bmiHeader.bV5ClrUsed;
+ if (cColorsUsed == 0)
+ cColorsUsed = (1 << pbmiSrc->bmiHeader.bV5BitCount);
+
if(dwColorUse == DIB_PAL_COLORS)
{
RtlCopyMemory(pbmiDst->bmiColors,
pbmiSrc->bmiColors,
- pbmiSrc->bmiHeader.bV5ClrUsed * sizeof(WORD));
+ cColorsUsed * sizeof(WORD));
}
else
{
- for(i = 0; i < pbmiSrc->bmiHeader.bV5ClrUsed; i++)
+ for(i = 0; i < cColorsUsed; i++)
{
SetBMIColor(pbmiDst, (DWORD*)pbmiSrc->bmiColors + i, i);
}