From 60e7472f72567e6d7417931dc4cd8bf969868043 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sat, 14 Jul 2007 09:19:46 +0000 Subject: Fix FS#7044 - if the color RGB(0,255,255) is in a bmp it will be replaced with the current foreground colour git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13878 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-16bit.c | 4 +++- firmware/export/lcd.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'firmware') diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index f03cab3877..73e901f583 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c @@ -727,7 +727,9 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, int i; for(i = 0;i < width;i++) { - if(src[i] != TRANSPARENT_COLOR) + if (src[i] == REPLACEWITHFG_COLOR) + dst[i] = fg_pattern; + else if(src[i] != TRANSPARENT_COLOR) dst[i] = src[i]; } src += stride; diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 787eea01f5..d379dc3613 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -291,6 +291,7 @@ enum #define FORMAT_REMOTE 0x10000000 #define TRANSPARENT_COLOR LCD_RGBPACK(255,0,255) +#define REPLACEWITHFG_COLOR LCD_RGBPACK(0,255,255) struct bitmap { int width; -- cgit v1.2.3