summaryrefslogtreecommitdiff
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 @@
23 23
24SDL_Surface *remote_surface; 24SDL_Surface *remote_surface;
25 25
26SDL_Color remote_color_zero = {UI_REMOTE_BGCOLORLIGHT, 0}; 26SDL_Color remote_color_zero = {UI_REMOTE_BGCOLOR, 0};
27SDL_Color remote_backlight_color_zero = {UI_REMOTE_BGCOLORLIGHT, 0};
27SDL_Color remote_color_max = {0, 0, 0, 0}; 28SDL_Color remote_color_max = {0, 0, 0, 0};
28 29
29extern unsigned char lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH]; 30extern 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)
44 (background ? UI_REMOTE_POSY : LCD_HEIGHT), get_lcd_remote_pixel); 45 (background ? UI_REMOTE_POSY : LCD_HEIGHT), get_lcd_remote_pixel);
45} 46}
46 47
48void sim_remote_backlight(int value)
49{
50 if (value > 0) {
51 sdl_set_gradient(remote_surface, &remote_backlight_color_zero, &remote_color_max, (1<<LCD_REMOTE_DEPTH));
52 } else {
53 sdl_set_gradient(remote_surface, &remote_color_zero, &remote_color_max, (1<<LCD_REMOTE_DEPTH));
54 }
55}
56
47/* initialise simulator lcd remote driver */ 57/* initialise simulator lcd remote driver */
48void sim_lcd_remote_init(void) 58void sim_lcd_remote_init(void)
49{ 59{