diff options
Diffstat (limited to 'uisimulator/sdl/lcd-remote.c')
-rw-r--r-- | uisimulator/sdl/lcd-remote.c | 12 |
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 | ||
24 | SDL_Surface *remote_surface; | 24 | SDL_Surface *remote_surface; |
25 | 25 | ||
26 | SDL_Color remote_color_zero = {UI_REMOTE_BGCOLORLIGHT, 0}; | 26 | SDL_Color remote_color_zero = {UI_REMOTE_BGCOLOR, 0}; |
27 | SDL_Color remote_backlight_color_zero = {UI_REMOTE_BGCOLORLIGHT, 0}; | ||
27 | SDL_Color remote_color_max = {0, 0, 0, 0}; | 28 | SDL_Color remote_color_max = {0, 0, 0, 0}; |
28 | 29 | ||
29 | extern unsigned char lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH]; | 30 | 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) | |||
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 | ||
48 | void 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 */ |
48 | void sim_lcd_remote_init(void) | 58 | void sim_lcd_remote_init(void) |
49 | { | 59 | { |