mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 17:06:29 +00:00
[WIN32K]
When a DC has the default palette selected, use the color value from PALETTERGB() directly instead of looking it up in the dc palette (just as the code was before). Fixes skipped bitmap winetests svn path=/trunk/; revision=56440
This commit is contained in:
parent
d926eda7ce
commit
4d93b7e8d5
|
@ -41,12 +41,20 @@ TranslateCOLORREF(PDC pdc, COLORREF *pcrColor)
|
|||
|
||||
case 0x02: /* PALETTERGB */
|
||||
|
||||
/* First find the nearest index in the dc palette */
|
||||
ppalDC = pdc->dclevel.ppal;
|
||||
index = PALETTE_ulGetNearestIndex(ppalDC, crColor & 0xFFFFFF);
|
||||
if (pdc->dclevel.hpal != StockObjects[DEFAULT_PALETTE])
|
||||
{
|
||||
/* First find the nearest index in the dc palette */
|
||||
ppalDC = pdc->dclevel.ppal;
|
||||
index = PALETTE_ulGetNearestIndex(ppalDC, crColor & 0xFFFFFF);
|
||||
|
||||
/* Get the RGB value */
|
||||
crColor = PALETTE_ulGetRGBColorFromIndex(ppalDC, index);
|
||||
/* Get the RGB value */
|
||||
crColor = PALETTE_ulGetRGBColorFromIndex(ppalDC, index);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use the pure color */
|
||||
crColor = crColor & 0x00FFFFFF;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x10: /* DIBINDEX */
|
||||
|
|
Loading…
Reference in a new issue