[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 5 Aug 2010 14:32:30 +0000 (14:32 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 5 Aug 2010 14:32:30 +0000 (14:32 +0000)
- Copy the alpha channel as well when doing RGB<->BGR color translations.

svn path=/trunk/; revision=48462

reactos/subsystems/win32/win32k/eng/xlate.c

index 27d0684..77f2a21 100644 (file)
@@ -64,11 +64,11 @@ EXLATEOBJ_iXlateRGBtoBGR(PEXLATEOBJ pxlo, ULONG iColor)
 {
     ULONG iNewColor;
 
 {
     ULONG iNewColor;
 
-    /* Copy green */
-    iNewColor = iColor & 0x00ff00;
+    /* Copy green and alpha */
+    iNewColor = iColor & 0xff00ff00;
 
     /* Mask red and blue */
 
     /* Mask red and blue */
-    iColor &= 0xff00ff;
+    iColor &= 0x00ff00ff;
 
     /* Shift and copy red and blue */
     iNewColor |= iColor >> 16;
 
     /* Shift and copy red and blue */
     iNewColor |= iColor >> 16;