summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/lcd-charcell.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/lcd-charcell.c')
-rw-r--r--uisimulator/sdl/lcd-charcell.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/uisimulator/sdl/lcd-charcell.c b/uisimulator/sdl/lcd-charcell.c
index 2ef86d0baf..89c46f7738 100644
--- a/uisimulator/sdl/lcd-charcell.c
+++ b/uisimulator/sdl/lcd-charcell.c
@@ -109,9 +109,11 @@ void drawrectangles(int color, struct rectangle *points, int count)
109void sim_backlight(int value) 109void sim_backlight(int value)
110{ 110{
111 if (value > 0) { 111 if (value > 0) {
112 sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max, (1<<LCD_DEPTH)); 112 sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max,
113 0, (1<<LCD_DEPTH));
113 } else { 114 } else {
114 sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, (1<<LCD_DEPTH)); 115 sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max,
116 0, (1<<LCD_DEPTH));
115 } 117 }
116 118
117 lcd_update(); 119 lcd_update();
@@ -124,6 +126,7 @@ void sim_lcd_init(void)
124 lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, LCD_WIDTH * display_zoom, 126 lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, LCD_WIDTH * display_zoom,
125 LCD_HEIGHT * display_zoom, 8, 0, 0, 0, 0); 127 LCD_HEIGHT * display_zoom, 8, 0, 0, 0, 0);
126 128
127 sdl_set_gradient(lcd_surface, &lcd_color_zero, &lcd_color_max, (1<<LCD_DEPTH)); 129 sdl_set_gradient(lcd_surface, &lcd_backlight_color_zero, &lcd_color_max,
130 0, (1<<LCD_DEPTH));
128} 131}
129 132