summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2018-06-12 13:25:12 +0200
committerMarcin Bukat <marcin.bukat@gmail.com>2018-06-12 13:25:12 +0200
commitf2075a57091199bab3024ca54f1c19402c869c2e (patch)
tree65ec7b4778e777726bb88f8a5c6098b00c17ac3b /firmware/export
parent0e48cb7768cb127bc8ca047d7c540c16d7baafae (diff)
downloadrockbox-f2075a57091199bab3024ca54f1c19402c869c2e.tar.gz
rockbox-f2075a57091199bab3024ca54f1c19402c869c2e.tar.bz2
rockbox-f2075a57091199bab3024ca54f1c19402c869c2e.zip
Add XRGB8888 native format
This got lost somehow during Agptek port merge Change-Id: Ie84463ba523d2307466b49354867117e7393a440
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/lcd.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index cf6a16572a..80ef45a573 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -134,7 +134,14 @@ struct _fb_pixel {
typedef struct _fb_pixel fb_data;
#define FB_DATA_SZ 3
#else /* LCD_DEPTH > 24 */
+#if (LCD_PIXELFORMAT == XRGB8888)
+struct _fb_pixel {
+ unsigned char b, g, r, x;
+};
+typedef struct _fb_pixel fb_data;
+#else
typedef unsigned long fb_data;
+#endif
#define FB_DATA_SZ 4
#endif /* LCD_DEPTH */
@@ -348,7 +355,7 @@ static inline unsigned lcd_color_to_native(unsigned color)
#define RGB_UNPACK_BLUE_LCD(x) _RGB_UNPACK_BLUE_LCD(x)
#endif /* RGB565* */
-#elif LCD_PIXELFORMAT == RGB888
+#elif (LCD_PIXELFORMAT == RGB888) || (LCD_PIXELFORMAT == XRGB8888)
#define LCD_MAX_RED 255
#define LCD_MAX_GREEN 255
#define LCD_MAX_BLUE 255