Author: tkreuzer
Date: Fri Apr 27 17:18:30 2012
New Revision: 56440
URL:
http://svn.reactos.org/svn/reactos?rev=56440&view=rev
Log:
[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
Modified:
trunk/reactos/win32ss/gdi/ntgdi/bitblt.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/bitblt.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/bitblt.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/bitblt.c [iso-8859-1] Fri Apr 27 17:18:30 2012
@@ -41,12 +41,20 @@
case 0x02: /* PALETTERGB */
- /* 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);
+ 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);
+ }
+ else
+ {
+ /* Use the pure color */
+ crColor = crColor & 0x00FFFFFF;
+ }
break;
case 0x10: /* DIBINDEX */