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

svn path=/branches/reactos-yarotows/; revision=47719
This commit is contained in:
Timo Kreuzer 2010-06-09 18:08:23 +00:00
parent 02588ba9c0
commit 26a57a2a9f

View file

@ -1951,15 +1951,21 @@ GetBMIFromBitmapV5Info(IN PBITMAPV5INFO pbmiSrc,
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);
}