summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-06-10 16:58:25 -0700
committerJay Sorg <jay.sorg@gmail.com>2014-06-10 16:58:25 -0700
commitd9b87e734b04dc860f46f2cfd6e9c34787e1c891 (patch)
treeb7e8e2ee1f85df3b37ebb4b01ac414ca0e67a7bb /common
parent5d495539196d4c9645f50fbb8f685b33ea5c5820 (diff)
downloadxrdp-proprietary-d9b87e734b04dc860f46f2cfd6e9c34787e1c891.tar.gz
xrdp-proprietary-d9b87e734b04dc860f46f2cfd6e9c34787e1c891.zip
common: small fix for 32 bit color
Diffstat (limited to 'common')
-rw-r--r--common/defines.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/defines.h b/common/defines.h
index c6e85a08..d87ddae7 100644
--- a/common/defines.h
+++ b/common/defines.h
@@ -72,7 +72,7 @@
(bpp==8?COLOR8(HRED(c),HGREEN(c),HBLUE(c)): \
(bpp==15?COLOR15(HRED(c),HGREEN(c),HBLUE(c)): \
(bpp==16?COLOR16(HRED(c),HGREEN(c),HBLUE(c)): \
- (bpp==24?COLOR24BGR(HRED(c),HGREEN(c),HBLUE(c)):c) \
+ (bpp>=24?COLOR24BGR(HRED(c),HGREEN(c),HBLUE(c)):c) \
) \
) \
) \
@@ -101,4 +101,10 @@
/* use crc for bitmap cache lookups */
#define USE_CRC
+#define XR_RGB2BGR(a_ulColor) \
+ (a_ulColor & 0xFF000000) | \
+ ((a_ulColor & 0x00FF0000) >> 16) | \
+ (a_ulColor & 0x0000FF00) | \
+ ((a_ulColor & 0x000000FF) << 16)
+
#endif