diff options
author | Jens Arnold <amiconn@rockbox.org> | 2009-01-24 09:38:54 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2009-01-24 09:38:54 +0000 |
commit | d8899b345551a83f027a9ed8e1a94cef3bb8644b (patch) | |
tree | 259c68a1556af5f05cd6e119492b6c0584e75290 | |
parent | 6fc558b2dbdfbda7231fb995aa81f7c85930223e (diff) |
Simulator: Fix an almost 3 years old colour init bug both on startup and on greylib init, that caused the weird colours in the m:robe 100 sim. Add a quick-fix for m:robe 100 greylib inversion in the sim.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19838 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | uisimulator/sdl/lcd-bitmap.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c index b9f5732dc7..bc2a4c46f4 100644 --- a/uisimulator/sdl/lcd-bitmap.c +++ b/uisimulator/sdl/lcd-bitmap.c @@ -119,6 +119,10 @@ void sim_backlight(int value) &lcd_backlight_color_zero, &lcd_backlight_color_split, &lcd_backlight_color_zero, (1<<LCD_DEPTH), lcd_ex_shades); +#elif defined MROBE_100 + /* quick fix, a proper fix needs to compare brightnesses */ + sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, + &lcd_backlight_color_max, (1<<LCD_DEPTH), lcd_ex_shades); #else sdl_set_gradient(lcd_surface, &lcd_backlight_color_max, &lcd_backlight_color_zero, (1<<LCD_DEPTH), lcd_ex_shades); @@ -128,6 +132,10 @@ void sim_backlight(int value) sdl_set_gradient(lcd_real_surface, &lcd_color_max, &lcd_color_zero, &lcd_color_split, &lcd_color_zero, (1<<LCD_DEPTH), lcd_ex_shades); +#elif defined MROBE_100 + /* quick fix, a proper fix needs to compare brightnesses */ + sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, + (1<<LCD_DEPTH), lcd_ex_shades); #else sdl_set_gradient(lcd_surface, &lcd_color_max, &lcd_color_zero, (1<<LCD_DEPTH), lcd_ex_shades); @@ -164,11 +172,11 @@ void sim_lcd_init(void) #ifdef HAVE_BACKLIGHT #ifdef UI_LCD_SPLIT sdl_set_gradient(lcd_real_surface, &lcd_backlight_color_zero, - &lcd_color_max, &lcd_backlight_color_zero, - &lcd_color_split, 0, (1<<LCD_DEPTH)); + &lcd_backlight_color_max, &lcd_backlight_color_zero, + &lcd_backlight_color_split, 0, (1<<LCD_DEPTH)); #else - sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max, 0, - (1<<LCD_DEPTH)); + sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, + &lcd_backlight_color_max, 0, (1<<LCD_DEPTH)); #endif #else sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, 0, @@ -186,11 +194,15 @@ void sim_lcd_ex_init(int shades, unsigned long (*getpixel)(int, int)) #ifdef HAVE_BACKLIGHT if (lcd_backlight_val > 0) { #ifdef UI_LCD_SPLIT - sdl_set_gradient(lcd_real_surface, &lcd_color_max, - &lcd_backlight_color_zero, &lcd_color_split, + sdl_set_gradient(lcd_real_surface, &lcd_backlight_color_max, + &lcd_backlight_color_zero, &lcd_backlight_color_split, &lcd_backlight_color_zero, (1<<LCD_DEPTH), shades); +#elif defined MROBE_100 + /* quick fix, a proper fix needs to compare brightnesses */ + sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, + &lcd_backlight_color_max, (1<<LCD_DEPTH), shades); #else - sdl_set_gradient(lcd_surface, &lcd_color_max, + sdl_set_gradient(lcd_surface, &lcd_backlight_color_max, &lcd_backlight_color_zero, (1<<LCD_DEPTH), shades); #endif } @@ -200,6 +212,10 @@ void sim_lcd_ex_init(int shades, unsigned long (*getpixel)(int, int)) #ifdef UI_LCD_SPLIT sdl_set_gradient(lcd_real_surface, &lcd_color_max, &lcd_color_zero, &lcd_color_split, &lcd_color_zero, (1<<LCD_DEPTH), shades); +#elif defined MROBE_100 + /* quick fix, a proper fix needs to compare brightnesses */ + sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, + (1<<LCD_DEPTH), shades); #else sdl_set_gradient(lcd_surface, &lcd_color_max, &lcd_color_zero, (1<<LCD_DEPTH), shades); |