From 38c2a5225455acca57f72649460b4a5d12d61ca1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 25 Oct 2011 15:21:01 +0000 Subject: Fix some errors in 8-bit color conversion macros; Fix tools/incdir.sh when g++ is used; Fix bad cast that caused problems with the background window is released git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4064 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/include/nuttx/rgbcolors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nuttx/include') diff --git a/nuttx/include/nuttx/rgbcolors.h b/nuttx/include/nuttx/rgbcolors.h index d2fcba8f1..93212f6e1 100644 --- a/nuttx/include/nuttx/rgbcolors.h +++ b/nuttx/include/nuttx/rgbcolors.h @@ -70,7 +70,7 @@ /* This macro creates RGB8 (3:3:2) from 8:8:8 RGB */ #define RGBTO8(r,g,b) \ - ((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(r) << 2) & 0x1c) | ((uint8_t)(r) & 0x03)) + ((((uint8_t)(r) << 5) & 0xe0) | (((uint8_t)(g) << 2) & 0x1c) | ((uint8_t)(b) & 0x03)) /* And these macros perform the inverse transformation */ -- cgit v1.2.3