diff options
author | Itamar Reis Peixoto <itamar@ispbrasil.com.br> | 2010-11-19 17:18:15 -0200 |
---|---|---|
committer | Itamar Reis Peixoto <itamar@ispbrasil.com.br> | 2010-11-20 22:13:49 -0200 |
commit | 759757435eb4d437e91c64fced55f58fd61e6c7a (patch) | |
tree | 2f13166e27d85f0932ee7a4ff2f10c0bbd174f70 /common | |
parent | 83edc21992cce552e1b71146db308d94547fc2bb (diff) | |
download | xrdp-proprietary-759757435eb4d437e91c64fced55f58fd61e6c7a.tar.gz xrdp-proprietary-759757435eb4d437e91c64fced55f58fd61e6c7a.zip |
xrdp comestic patch from "Alessandro Briosi" <tsdogs@briosix.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/defines.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/defines.h b/common/defines.h index a6f6e303..8e2328a7 100644 --- a/common/defines.h +++ b/common/defines.h @@ -66,6 +66,19 @@ #define COLOR16(r, g, b) ((((r) >> 3) << 11) | (((g) >> 2) << 5) | ((b) >> 3)) #define COLOR24RGB(r, g, b) (((r) << 16) | ((g) << 8) | (b)) #define COLOR24BGR(r, g, b) (((b) << 16) | ((g) << 8) | (r)) +#define HRED(c) ((c & 0xff0000) >> 16) +#define HGREEN(c) ((c & 0x00ff00) >> 8) +#define HBLUE(c) ((c & 0x0000ff)) +#define HCOLOR(bpp,c) \ +( \ + (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) \ + ) \ + ) \ + ) \ +) #define SPLITCOLOR15(r, g, b, c) \ { \ r = (((c) >> 7) & 0xf8) | (((c) >> 12) & 0x7); \ |