summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/sdl/lcd-bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/sdl/lcd-bitmap.c')
-rw-r--r--firmware/target/hosted/sdl/lcd-bitmap.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/target/hosted/sdl/lcd-bitmap.c b/firmware/target/hosted/sdl/lcd-bitmap.c
index 7058b26e8c..4c296924af 100644
--- a/firmware/target/hosted/sdl/lcd-bitmap.c
+++ b/firmware/target/hosted/sdl/lcd-bitmap.c
@@ -22,8 +22,12 @@
22#include "debug.h" 22#include "debug.h"
23#include "sim-ui-defines.h" 23#include "sim-ui-defines.h"
24#include "system.h" 24#include "system.h"
25#include "button-sdl.h"
25#include "lcd-sdl.h" 26#include "lcd-sdl.h"
26#include "screendump.h" 27#include "screendump.h"
28#if (CONFIG_PLATFORM & PLATFORM_MAEMO)
29#include "maemo-thread.h"
30#endif
27 31
28SDL_Surface* lcd_surface; 32SDL_Surface* lcd_surface;
29 33
@@ -123,6 +127,16 @@ void lcd_update(void)
123 127
124void lcd_update_rect(int x_start, int y_start, int width, int height) 128void lcd_update_rect(int x_start, int y_start, int width, int height)
125{ 129{
130#if (CONFIG_PLATFORM & PLATFORM_MAEMO)
131 /* Don't update display if not shown */
132 if (!maemo_display_on)
133 return;
134
135 /* Don't update if we don't have the input focus */
136 if (!sdl_app_has_input_focus)
137 return;
138#endif
139
126 sdl_update_rect(lcd_surface, x_start, y_start, width, height, 140 sdl_update_rect(lcd_surface, x_start, y_start, width, height,
127 LCD_WIDTH, LCD_HEIGHT, get_lcd_pixel); 141 LCD_WIDTH, LCD_HEIGHT, get_lcd_pixel);
128 sdl_gui_update(lcd_surface, x_start, y_start, width, 142 sdl_gui_update(lcd_surface, x_start, y_start, width,