diff options
Diffstat (limited to 'uisimulator/sdl/lcd-bitmap.c')
-rw-r--r-- | uisimulator/sdl/lcd-bitmap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c index da4050461c..d6e9f90a7f 100644 --- a/uisimulator/sdl/lcd-bitmap.c +++ b/uisimulator/sdl/lcd-bitmap.c | |||
@@ -25,8 +25,10 @@ SDL_Surface* lcd_surface; | |||
25 | int lcd_backlight_val; | 25 | int lcd_backlight_val; |
26 | 26 | ||
27 | #if LCD_DEPTH <= 8 | 27 | #if LCD_DEPTH <= 8 |
28 | SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0}; | 28 | #ifdef CONFIG_BACKLIGHT |
29 | SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; | 29 | SDL_Color lcd_backlight_color_zero = {UI_LCD_BGCOLORLIGHT, 0}; |
30 | #endif | ||
31 | SDL_Color lcd_color_zero = {UI_LCD_BGCOLOR, 0}; | ||
30 | SDL_Color lcd_color_max = {0, 0, 0, 0}; | 32 | SDL_Color lcd_color_max = {0, 0, 0, 0}; |
31 | #endif | 33 | #endif |
32 | 34 | ||
@@ -116,8 +118,13 @@ void sim_lcd_init(void) | |||
116 | #endif | 118 | #endif |
117 | 119 | ||
118 | #if LCD_DEPTH <= 8 | 120 | #if LCD_DEPTH <= 8 |
121 | #ifdef CONFIG_BACKLIGHT | ||
119 | sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max, | 122 | sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max, |
120 | 0, (1<<LCD_DEPTH)); | 123 | 0, (1<<LCD_DEPTH)); |
124 | #else | ||
125 | sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, 0, | ||
126 | (1<<LCD_DEPTH)); | ||
127 | #endif | ||
121 | #endif | 128 | #endif |
122 | } | 129 | } |
123 | 130 | ||