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.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/uisimulator/sdl/lcd-remote.c b/uisimulator/sdl/lcd-remote.c
index 64b641ad6d..f1d04b33f8 100644
--- a/uisimulator/sdl/lcd-remote.c
+++ b/uisimulator/sdl/lcd-remote.c
@@ -41,19 +41,26 @@ void lcd_remote_update (void)
41void lcd_remote_update_rect(int x_start, int y_start, int width, int height) 41void lcd_remote_update_rect(int x_start, int y_start, int width, int height)
42{ 42{
43 sdl_update_rect(remote_surface, x_start, y_start, width, height, 43 sdl_update_rect(remote_surface, x_start, y_start, width, height,
44 LCD_REMOTE_WIDTH, LCD_REMOTE_HEIGHT, get_lcd_remote_pixel);
45 sdl_gui_update(remote_surface, x_start, y_start, width, height,
44 LCD_REMOTE_WIDTH, LCD_REMOTE_HEIGHT, background ? UI_REMOTE_POSX : 0, 46 LCD_REMOTE_WIDTH, LCD_REMOTE_HEIGHT, background ? UI_REMOTE_POSX : 0,
45 (background ? UI_REMOTE_POSY : LCD_HEIGHT), get_lcd_remote_pixel); 47 background ? UI_REMOTE_POSY : LCD_HEIGHT);
46} 48}
47 49
48void sim_remote_backlight(int value) 50void sim_remote_backlight(int value)
49{ 51{
50 if (value > 0) { 52 if (value > 0) {
51 sdl_set_gradient(remote_surface, &remote_backlight_color_zero, &remote_color_max, (1<<LCD_REMOTE_DEPTH)); 53 sdl_set_gradient(remote_surface, &remote_backlight_color_zero,
54 &remote_color_max, 0, (1<<LCD_REMOTE_DEPTH));
52 } else { 55 } else {
53 sdl_set_gradient(remote_surface, &remote_color_zero, &remote_color_max, (1<<LCD_REMOTE_DEPTH)); 56 sdl_set_gradient(remote_surface, &remote_color_zero, &remote_color_max,
57 0, (1<<LCD_REMOTE_DEPTH));
54 } 58 }
55 59
56 lcd_remote_update(); 60 sdl_gui_update(remote_surface, 0, 0, LCD_REMOTE_WIDTH, LCD_REMOTE_HEIGHT,
61 LCD_REMOTE_WIDTH, LCD_REMOTE_HEIGHT,
62 background ? UI_REMOTE_POSX : 0,
63 background? UI_REMOTE_POSY : LCD_HEIGHT);
57} 64}
58 65
59/* initialise simulator lcd remote driver */ 66/* initialise simulator lcd remote driver */
@@ -63,7 +70,7 @@ void sim_lcd_remote_init(void)
63 LCD_REMOTE_WIDTH * display_zoom, LCD_REMOTE_HEIGHT * display_zoom, 70 LCD_REMOTE_WIDTH * display_zoom, LCD_REMOTE_HEIGHT * display_zoom,
64 8, 0, 0, 0, 0); 71 8, 0, 0, 0, 0);
65 72
66 sdl_set_gradient(remote_surface, &remote_color_zero, &remote_color_max, 73 sdl_set_gradient(remote_surface, &remote_backlight_color_zero,
67 (1<<LCD_REMOTE_DEPTH)); 74 &remote_color_max, 0, (1<<LCD_REMOTE_DEPTH));
68} 75}
69 76