diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-04-06 22:55:00 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-04-06 22:55:00 +0000 |
commit | f9b90e91031dbd23fed24e832de4d8d2e15151a0 (patch) | |
tree | 964a492f1c4a658ec0ecb82d100ce62d2f6ec93a /apps/gui | |
parent | a5d7309d96cca974e1524dc746482ab2a26d7395 (diff) | |
download | rockbox-f9b90e91031dbd23fed24e832de4d8d2e15151a0.tar.gz rockbox-f9b90e91031dbd23fed24e832de4d8d2e15151a0.zip |
Now charcell displays require lcd_update() for updating the main lcd content like bitmap displays.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13050 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/splash.c | 2 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 17 | ||||
-rw-r--r-- | apps/gui/textarea.c | 12 | ||||
-rw-r--r-- | apps/gui/textarea.h | 9 |
4 files changed, 11 insertions, 29 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 4234171207..72279a371d 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c | |||
@@ -178,9 +178,7 @@ static void splash(struct screen * screen, const char *fmt, va_list ap) | |||
178 | screen->set_drawmode(DRMODE_SOLID); | 178 | screen->set_drawmode(DRMODE_SOLID); |
179 | } | 179 | } |
180 | #endif | 180 | #endif |
181 | #if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) | ||
182 | screen->update(); | 181 | screen->update(); |
183 | #endif | ||
184 | } | 182 | } |
185 | 183 | ||
186 | void gui_splash(struct screen * screen, int ticks, | 184 | void gui_splash(struct screen * screen, int ticks, |
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index e93fc9649e..e082063a6f 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -191,10 +191,10 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
191 | } | 191 | } |
192 | else | 192 | else |
193 | { | 193 | { |
194 | #else | 194 | #else /* CONFIG_CHARGING < CHARGING_MONITOR */ |
195 | lasttime = current_tick; | 195 | lasttime = current_tick; |
196 | { | 196 | { |
197 | #endif | 197 | #endif /* CONFIG_CHARGING < CHARGING_MONITOR */ |
198 | /* animate in (max.) 4 steps, starting near the current charge level */ | 198 | /* animate in (max.) 4 steps, starting near the current charge level */ |
199 | if (TIME_AFTER(current_tick, bar->battery_icon_switch_tick)) | 199 | if (TIME_AFTER(current_tick, bar->battery_icon_switch_tick)) |
200 | { | 200 | { |
@@ -205,7 +205,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
205 | } | 205 | } |
206 | } | 206 | } |
207 | else | 207 | else |
208 | #endif | 208 | #endif /* CONFIG_CHARGING */ |
209 | { | 209 | { |
210 | bar->info.batt_charge_step = -1; | 210 | bar->info.batt_charge_step = -1; |
211 | if (battery_level_safe()) | 211 | if (battery_level_safe()) |
@@ -254,13 +254,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
254 | display->fillrect(0, 0, display->width, STATUSBAR_HEIGHT); | 254 | display->fillrect(0, 0, display->width, STATUSBAR_HEIGHT); |
255 | display->set_drawmode(DRMODE_SOLID); | 255 | display->set_drawmode(DRMODE_SOLID); |
256 | 256 | ||
257 | #else | ||
258 | |||
259 | /* players always "redraw" */ | ||
260 | { | ||
261 | #endif /* HAVE_LCD_BITMAP */ | ||
262 | |||
263 | #ifdef HAVE_LCD_BITMAP | ||
264 | if (bar->info.battery_state) | 257 | if (bar->info.battery_state) |
265 | gui_statusbar_icon_battery(display, bar->info.battlevel, | 258 | gui_statusbar_icon_battery(display, bar->info.battlevel, |
266 | bar->info.batt_charge_step); | 259 | bar->info.batt_charge_step); |
@@ -281,7 +274,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
281 | STATUSBAR_PLUG_X_POS, | 274 | STATUSBAR_PLUG_X_POS, |
282 | STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH, | 275 | STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH, |
283 | STATUSBAR_HEIGHT); | 276 | STATUSBAR_HEIGHT); |
284 | #endif | 277 | #endif /* CONFIG_CHARGING */ |
285 | #ifdef HAVE_RECORDING | 278 | #ifdef HAVE_RECORDING |
286 | /* turn off volume display in recording screen */ | 279 | /* turn off volume display in recording screen */ |
287 | bool recscreen_on = in_recording_screen(); | 280 | bool recscreen_on = in_recording_screen(); |
@@ -332,8 +325,8 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
332 | #endif | 325 | #endif |
333 | display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT); | 326 | display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT); |
334 | bar->lastinfo = bar->info; | 327 | bar->lastinfo = bar->info; |
335 | #endif /* HAVE_LCD_BITMAP */ | ||
336 | } | 328 | } |
329 | #endif /* HAVE_LCD_BITMAP */ | ||
337 | 330 | ||
338 | 331 | ||
339 | #ifdef HAVE_LCD_CHARCELLS | 332 | #ifdef HAVE_LCD_CHARCELLS |
diff --git a/apps/gui/textarea.c b/apps/gui/textarea.c index 54aa7e4a6c..0dd063c493 100644 --- a/apps/gui/textarea.c +++ b/apps/gui/textarea.c | |||
@@ -33,14 +33,16 @@ void gui_textarea_clear(struct screen * display) | |||
33 | #endif | 33 | #endif |
34 | } | 34 | } |
35 | 35 | ||
36 | #ifdef HAVE_LCD_BITMAP | ||
37 | void gui_textarea_update(struct screen * display) | 36 | void gui_textarea_update(struct screen * display) |
38 | { | 37 | { |
38 | #ifdef HAVE_LCD_BITMAP | ||
39 | int y_start = gui_textarea_get_ystart(display); | 39 | int y_start = gui_textarea_get_ystart(display); |
40 | int y_end = gui_textarea_get_yend(display); | 40 | int y_end = gui_textarea_get_yend(display); |
41 | display->update_rect(0, y_start, display->width, y_end - y_start); | 41 | display->update_rect(0, y_start, display->width, y_end - y_start); |
42 | } | 42 | #else |
43 | display->update(); | ||
43 | #endif | 44 | #endif |
45 | } | ||
44 | 46 | ||
45 | int gui_textarea_put_message(struct screen * display, | 47 | int gui_textarea_put_message(struct screen * display, |
46 | struct text_message * message, | 48 | struct text_message * message, |
@@ -56,8 +58,8 @@ int gui_textarea_put_message(struct screen * display, | |||
56 | 58 | ||
57 | void gui_textarea_update_nblines(struct screen * display) | 59 | void gui_textarea_update_nblines(struct screen * display) |
58 | { | 60 | { |
59 | #ifdef HAVE_LCD_BITMAP | ||
60 | int height=display->height; | 61 | int height=display->height; |
62 | #ifdef HAVE_LCD_BITMAP | ||
61 | if(global_settings.statusbar) | 63 | if(global_settings.statusbar) |
62 | height -= STATUSBAR_HEIGHT; | 64 | height -= STATUSBAR_HEIGHT; |
63 | #ifdef HAS_BUTTONBAR | 65 | #ifdef HAS_BUTTONBAR |
@@ -66,11 +68,9 @@ void gui_textarea_update_nblines(struct screen * display) | |||
66 | #endif | 68 | #endif |
67 | display->getstringsize((unsigned char *)"A", &display->char_width, | 69 | display->getstringsize((unsigned char *)"A", &display->char_width, |
68 | &display->char_height); | 70 | &display->char_height); |
69 | display->nb_lines = height / display->char_height; | ||
70 | #else | 71 | #else |
71 | display->char_width = 1; | 72 | display->char_width = 1; |
72 | display->char_height = 1; | 73 | display->char_height = 1; |
73 | /* default on char based player supported by rb */ | ||
74 | display->nb_lines = MAX_LINES_ON_SCREEN; | ||
75 | #endif | 74 | #endif |
75 | display->nb_lines = height / display->char_height; | ||
76 | } | 76 | } |
diff --git a/apps/gui/textarea.h b/apps/gui/textarea.h index b1af1a5aba..413169db24 100644 --- a/apps/gui/textarea.h +++ b/apps/gui/textarea.h | |||
@@ -40,16 +40,7 @@ extern void gui_textarea_clear(struct screen * display); | |||
40 | * Updates the area in the screen in which text can be displayed | 40 | * Updates the area in the screen in which text can be displayed |
41 | * - display : the screen structure | 41 | * - display : the screen structure |
42 | */ | 42 | */ |
43 | #ifdef HAVE_LCD_BITMAP | ||
44 | extern void gui_textarea_update(struct screen * display); | 43 | extern void gui_textarea_update(struct screen * display); |
45 | #else | ||
46 | #ifdef SIMULATOR | ||
47 | #define gui_textarea_update(display) \ | ||
48 | (display)->update(); | ||
49 | #else | ||
50 | #define gui_textarea_update(display) | ||
51 | #endif | ||
52 | #endif | ||
53 | 44 | ||
54 | /* | 45 | /* |
55 | * Displays message lines on the given screen | 46 | * Displays message lines on the given screen |