summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl/lcd-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/lcd-remote.c')
-rw-r--r--uisimulator/sdl/lcd-remote.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/uisimulator/sdl/lcd-remote.c b/uisimulator/sdl/lcd-remote.c
index b5a07d2f20..5ce0447601 100644
--- a/uisimulator/sdl/lcd-remote.c
+++ b/uisimulator/sdl/lcd-remote.c
@@ -23,7 +23,8 @@
SDL_Surface *remote_surface;
-SDL_Color remote_color_zero = {UI_REMOTE_BGCOLORLIGHT, 0};
+SDL_Color remote_color_zero = {UI_REMOTE_BGCOLOR, 0};
+SDL_Color remote_backlight_color_zero = {UI_REMOTE_BGCOLORLIGHT, 0};
SDL_Color remote_color_max = {0, 0, 0, 0};
extern unsigned char lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH];
@@ -44,6 +45,15 @@ void lcd_remote_update_rect(int x_start, int y_start, int width, int height)
(background ? UI_REMOTE_POSY : LCD_HEIGHT), get_lcd_remote_pixel);
}
+void sim_remote_backlight(int value)
+{
+ if (value > 0) {
+ sdl_set_gradient(remote_surface, &remote_backlight_color_zero, &remote_color_max, (1<<LCD_REMOTE_DEPTH));
+ } else {
+ sdl_set_gradient(remote_surface, &remote_color_zero, &remote_color_max, (1<<LCD_REMOTE_DEPTH));
+ }
+}
+
/* initialise simulator lcd remote driver */
void sim_lcd_remote_init(void)
{