summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/lcd-bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/lcd-bitmap.c')
-rw-r--r--uisimulator/sdl/lcd-bitmap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c
index 7b6e2217c6..438b133804 100644
--- a/uisimulator/sdl/lcd-bitmap.c
+++ b/uisimulator/sdl/lcd-bitmap.c
@@ -27,9 +27,10 @@ int lcd_backlight_val;
27#if LCD_DEPTH <= 8 27#if LCD_DEPTH <= 8
28#ifdef HAVE_BACKLIGHT 28#ifdef HAVE_BACKLIGHT
29SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; 29SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0};
30SDL_Color lcd_backlight_color_max = {UI_LCD_FGCOLORLIGHT, 0};
30#endif 31#endif
31SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0}; 32SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0};
32SDL_Color lcd_color_max = {0, 0, 0, 0}; 33SDL_Color lcd_color_max = {UI_LCD_FGCOLOR, 0};
33#endif 34#endif
34 35
35#if LCD_DEPTH < 8 36#if LCD_DEPTH < 8
@@ -79,7 +80,7 @@ void sim_backlight(int value)
79#if LCD_DEPTH <= 8 80#if LCD_DEPTH <= 8
80 if (value > 0) { 81 if (value > 0) {
81 sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, 82 sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero,
82 &lcd_color_max, 0, (1<<LCD_DEPTH)); 83 &lcd_backlight_color_max, 0, (1<<LCD_DEPTH));
83 } else { 84 } else {
84 sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, 85 sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max,
85 0, (1<<LCD_DEPTH)); 86 0, (1<<LCD_DEPTH));
@@ -87,7 +88,7 @@ void sim_backlight(int value)
87#if LCD_DEPTH < 8 88#if LCD_DEPTH < 8
88 if (lcd_ex_shades) { 89 if (lcd_ex_shades) {
89 if (value > 0) { 90 if (value > 0) {
90 sdl_set_gradient(lcd_surface, &lcd_color_max, 91 sdl_set_gradient(lcd_surface, &lcd_backlight_color_max,
91 &lcd_backlight_color_zero, (1<<LCD_DEPTH), 92 &lcd_backlight_color_zero, (1<<LCD_DEPTH),
92 lcd_ex_shades); 93 lcd_ex_shades);
93 } else { 94 } else {