summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c12
-rw-r--r--apps/gui/splash.c2
-rw-r--r--apps/gui/statusbar.c17
-rw-r--r--apps/gui/textarea.c12
-rw-r--r--apps/gui/textarea.h9
-rw-r--r--apps/main.c3
-rw-r--r--apps/misc.c30
-rw-r--r--apps/plugin.c14
-rw-r--r--apps/plugins/alpine_cdc.c2
-rw-r--r--apps/plugins/battery_bench.c19
-rw-r--r--apps/plugins/chessclock.c9
-rw-r--r--apps/plugins/credits.c3
-rw-r--r--apps/plugins/dice.c2
-rw-r--r--apps/plugins/dict.c3
-rw-r--r--apps/plugins/disktidy.c2
-rw-r--r--apps/plugins/euroconverter.c8
-rw-r--r--apps/plugins/firmware_flash.c22
-rw-r--r--apps/plugins/flipit.c15
-rw-r--r--apps/plugins/jackpot.c8
-rw-r--r--apps/plugins/lib/playergfx.c2
-rw-r--r--apps/plugins/logo.c4
-rw-r--r--apps/plugins/metronome.c2
-rw-r--r--apps/plugins/nim.c9
-rw-r--r--apps/plugins/properties.c6
-rw-r--r--apps/plugins/random_folder_advance_config.c10
-rw-r--r--apps/plugins/rockbox_flash.c9
-rw-r--r--apps/plugins/searchengine/searchengine.h3
-rw-r--r--apps/plugins/stats.c34
-rw-r--r--apps/plugins/stopwatch.c2
-rw-r--r--apps/plugins/vbrfix.c4
-rw-r--r--apps/plugins/viewer.c6
-rw-r--r--apps/screens.c5
32 files changed, 125 insertions, 163 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index dff84d1eda..be77699d7e 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1057,7 +1057,7 @@ bool dbg_ports(void)
1057 lcd_puts(0, line++, buf); 1057 lcd_puts(0, line++, buf);
1058 1058
1059#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) 1059#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES)
1060 snprintf(buf, sizeof(buf), "remotetype:: %d", remote_type()); 1060 snprintf(buf, sizeof(buf), "remotetype: %d", remote_type());
1061 lcd_puts(0, line++, buf); 1061 lcd_puts(0, line++, buf);
1062#endif 1062#endif
1063 1063
@@ -1248,6 +1248,7 @@ bool dbg_ports(void)
1248 snprintf(buf, 32, "Batt: %d.%02dV", adc_battery_voltage / 100, 1248 snprintf(buf, 32, "Batt: %d.%02dV", adc_battery_voltage / 100,
1249 adc_battery_voltage % 100); 1249 adc_battery_voltage % 100);
1250 lcd_puts(0, 1, buf); 1250 lcd_puts(0, 1, buf);
1251 lcd_update();
1251 1252
1252 button = get_action(CONTEXT_SETTINGS,HZ/5); 1253 button = get_action(CONTEXT_SETTINGS,HZ/5);
1253 1254
@@ -1350,6 +1351,7 @@ static bool view_battery(void)
1350 1351
1351 while(1) 1352 while(1)
1352 { 1353 {
1354 lcd_clear_display();
1353 switch (view) { 1355 switch (view) {
1354 case 0: /* voltage history graph */ 1356 case 0: /* voltage history graph */
1355 /* Find maximum and minimum voltage for scaling */ 1357 /* Find maximum and minimum voltage for scaling */
@@ -1371,7 +1373,6 @@ static bool view_battery(void)
1371 if (minv == maxv) 1373 if (minv == maxv)
1372 maxv < 65535 ? maxv++ : minv--; 1374 maxv < 65535 ? maxv++ : minv--;
1373 1375
1374 lcd_clear_display();
1375 snprintf(buf, 30, "Battery %d.%02d", power_history[0] / 100, 1376 snprintf(buf, 30, "Battery %d.%02d", power_history[0] / 100,
1376 power_history[0] % 100); 1377 power_history[0] % 100);
1377 lcd_puts(0, 0, buf); 1378 lcd_puts(0, 0, buf);
@@ -1393,7 +1394,6 @@ static bool view_battery(void)
1393 break; 1394 break;
1394 1395
1395 case 1: /* status: */ 1396 case 1: /* status: */
1396 lcd_clear_display();
1397 lcd_puts(0, 0, "Power status:"); 1397 lcd_puts(0, 0, "Power status:");
1398 1398
1399 battery_read_info(NULL, &y, NULL); 1399 battery_read_info(NULL, &y, NULL);
@@ -1456,7 +1456,6 @@ static bool view_battery(void)
1456 break; 1456 break;
1457 1457
1458 case 2: /* voltage deltas: */ 1458 case 2: /* voltage deltas: */
1459 lcd_clear_display();
1460 lcd_puts(0, 0, "Voltage deltas:"); 1459 lcd_puts(0, 0, "Voltage deltas:");
1461 1460
1462 for (i = 0; i <= 6; i++) { 1461 for (i = 0; i <= 6; i++) {
@@ -1469,7 +1468,6 @@ static bool view_battery(void)
1469 break; 1468 break;
1470 1469
1471 case 3: /* remaining time estimation: */ 1470 case 3: /* remaining time estimation: */
1472 lcd_clear_display();
1473 1471
1474#if CONFIG_CHARGING == CHARGING_CONTROL 1472#if CONFIG_CHARGING == CHARGING_CONTROL
1475 snprintf(buf, 30, "charge_state: %d", charge_state); 1473 snprintf(buf, 30, "charge_state: %d", charge_state);
@@ -1657,9 +1655,7 @@ static bool dbg_disk_info(void)
1657 bool timing_info_present = false; 1655 bool timing_info_present = false;
1658 char pio3[2], pio4[2]; 1656 char pio3[2], pio4[2];
1659 1657
1660#ifdef HAVE_LCD_BITMAP
1661 lcd_setmargins(0, 0); 1658 lcd_setmargins(0, 0);
1662#endif
1663 1659
1664 while(!done) 1660 while(!done)
1665 { 1661 {
@@ -1999,9 +1995,7 @@ static bool dbg_fm_radio(void)
1999 char buf[32]; 1995 char buf[32];
2000 bool fm_detected; 1996 bool fm_detected;
2001 1997
2002#ifdef HAVE_LCD_BITMAP
2003 lcd_setmargins(0, 0); 1998 lcd_setmargins(0, 0);
2004#endif
2005 1999
2006 while(1) 2000 while(1)
2007 { 2001 {
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
186void gui_splash(struct screen * screen, int ticks, 184void 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
37void gui_textarea_update(struct screen * display) 36void 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
45int gui_textarea_put_message(struct screen * display, 47int 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
57void gui_textarea_update_nblines(struct screen * display) 59void 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
44extern void gui_textarea_update(struct screen * display); 43extern 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
diff --git a/apps/main.c b/apps/main.c
index 3b0521a03a..c5f2a99943 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -442,8 +442,9 @@ static void init(void)
442#ifdef HAVE_LCD_BITMAP 442#ifdef HAVE_LCD_BITMAP
443 lcd_puts(0, 2, "Insert USB cable"); 443 lcd_puts(0, 2, "Insert USB cable");
444 lcd_puts(0, 3, "and fix it."); 444 lcd_puts(0, 3, "and fix it.");
445 lcd_update();
446#endif 445#endif
446 lcd_update();
447
447 while(button_get(true) != SYS_USB_CONNECTED) {}; 448 while(button_get(true) != SYS_USB_CONNECTED) {};
448 usb_screen(); 449 usb_screen();
449 system_reboot(); 450 system_reboot();
diff --git a/apps/misc.c b/apps/misc.c
index 5b008f525c..e3b94340de 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -825,23 +825,29 @@ int show_logo( void )
825 char version[32]; 825 char version[32];
826 int font_h, font_w; 826 int font_h, font_w;
827 827
828 snprintf(version, sizeof(version), "Ver. %s", appsversion);
829
828 lcd_clear_display(); 830 lcd_clear_display();
829 lcd_bitmap(rockboxlogo, 0, 10, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo); 831 lcd_bitmap(rockboxlogo, 0, 10, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo);
830
831#ifdef HAVE_REMOTE_LCD
832 lcd_remote_clear_display();
833 lcd_remote_bitmap(remote_rockboxlogo, 0, 10, BMPWIDTH_remote_rockboxlogo,
834 BMPHEIGHT_remote_rockboxlogo);
835#endif
836
837 snprintf(version, sizeof(version), "Ver. %s", appsversion);
838 lcd_setfont(FONT_SYSFIXED); 832 lcd_setfont(FONT_SYSFIXED);
839 lcd_getstringsize((unsigned char *)"A", &font_w, &font_h); 833 lcd_getstringsize((unsigned char *)"A", &font_w, &font_h);
840 lcd_putsxy((LCD_WIDTH/2) - ((strlen(version)*font_w)/2), 834 lcd_putsxy((LCD_WIDTH/2) - ((strlen(version)*font_w)/2),
841 LCD_HEIGHT-font_h, (unsigned char *)version); 835 LCD_HEIGHT-font_h, (unsigned char *)version);
836
837#else
838 char *rockbox = " ROCKbox!";
839
840 lcd_clear_display();
841 lcd_double_height(true);
842 lcd_puts(0, 0, rockbox);
843 lcd_puts_scroll(0, 1, appsversion);
844#endif
842 lcd_update(); 845 lcd_update();
843 846
844#ifdef HAVE_REMOTE_LCD 847#ifdef HAVE_REMOTE_LCD
848 lcd_remote_clear_display();
849 lcd_remote_bitmap(remote_rockboxlogo, 0, 10, BMPWIDTH_remote_rockboxlogo,
850 BMPHEIGHT_remote_rockboxlogo);
845 lcd_remote_setfont(FONT_SYSFIXED); 851 lcd_remote_setfont(FONT_SYSFIXED);
846 lcd_remote_getstringsize((unsigned char *)"A", &font_w, &font_h); 852 lcd_remote_getstringsize((unsigned char *)"A", &font_w, &font_h);
847 lcd_remote_putsxy((LCD_REMOTE_WIDTH/2) - ((strlen(version)*font_w)/2), 853 lcd_remote_putsxy((LCD_REMOTE_WIDTH/2) - ((strlen(version)*font_w)/2),
@@ -849,14 +855,6 @@ int show_logo( void )
849 lcd_remote_update(); 855 lcd_remote_update();
850#endif 856#endif
851 857
852#else
853 char *rockbox = " ROCKbox!";
854 lcd_clear_display();
855 lcd_double_height(true);
856 lcd_puts(0, 0, rockbox);
857 lcd_puts_scroll(0, 1, appsversion);
858#endif
859
860 return 0; 858 return 0;
861} 859}
862 860
diff --git a/apps/plugin.c b/apps/plugin.c
index 31de9fa56f..e3e6dd4c37 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -504,9 +504,7 @@ int plugin_load(const char* plugin, void* parameter)
504 int fd; 504 int fd;
505 ssize_t readsize; 505 ssize_t readsize;
506#endif 506#endif
507#ifdef HAVE_LCD_BITMAP
508 int xm, ym; 507 int xm, ym;
509#endif
510#ifdef HAVE_REMOTE_LCD 508#ifdef HAVE_REMOTE_LCD
511 int rxm, rym; 509 int rxm, rym;
512#endif 510#endif
@@ -589,20 +587,15 @@ int plugin_load(const char* plugin, void* parameter)
589 587
590 plugin_loaded = true; 588 plugin_loaded = true;
591 589
592#ifdef HAVE_LCD_BITMAP
593 xm = lcd_getxmargin(); 590 xm = lcd_getxmargin();
594 ym = lcd_getymargin(); 591 ym = lcd_getymargin();
595 lcd_setmargins(0,0); 592 lcd_setmargins(0,0);
596 593
597#if LCD_DEPTH > 1 594#if defined HAVE_LCD_BITMAP && LCD_DEPTH > 1
598 old_backdrop = lcd_get_backdrop(); 595 old_backdrop = lcd_get_backdrop();
599#endif 596#endif
600
601 lcd_clear_display(); 597 lcd_clear_display();
602 lcd_update(); 598 lcd_update();
603#else /* !HAVE_LCD_BITMAP */
604 lcd_clear_display();
605#endif
606 599
607#ifdef HAVE_REMOTE_LCD 600#ifdef HAVE_REMOTE_LCD
608 rxm = lcd_remote_getxmargin(); 601 rxm = lcd_remote_getxmargin();
@@ -632,11 +625,12 @@ int plugin_load(const char* plugin, void* parameter)
632#else /* LCD_DEPTH == 1 */ 625#else /* LCD_DEPTH == 1 */
633 lcd_set_drawmode(DRMODE_SOLID); 626 lcd_set_drawmode(DRMODE_SOLID);
634#endif /* LCD_DEPTH */ 627#endif /* LCD_DEPTH */
628#endif /* HAVE_LCD_BITMAP */
629
635 /* restore margins */ 630 /* restore margins */
636 lcd_setmargins(xm,ym); 631 lcd_setmargins(xm,ym);
637 lcd_clear_display(); 632 lcd_clear_display();
638 lcd_update(); 633 lcd_update();
639#endif /* HAVE_LCD_BITMAP */
640 634
641#ifdef HAVE_REMOTE_LCD 635#ifdef HAVE_REMOTE_LCD
642#if LCD_REMOTE_DEPTH > 1 636#if LCD_REMOTE_DEPTH > 1
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c
index 4fa2e36f54..c235900a8c 100644
--- a/apps/plugins/alpine_cdc.c
+++ b/apps/plugins/alpine_cdc.c
@@ -647,9 +647,7 @@ void print_scroll(char* string)
647 rb->snprintf(screen[(pos+screentop) % LINES], sizeof(screen[0]), "%s", string); 647 rb->snprintf(screen[(pos+screentop) % LINES], sizeof(screen[0]), "%s", string);
648 648
649 rb->lcd_puts(0, pos, screen[(pos+screentop) % LINES]); 649 rb->lcd_puts(0, pos, screen[(pos+screentop) % LINES]);
650#ifndef HAVE_LCD_CHARCELLS
651 rb->lcd_update(); 650 rb->lcd_update();
652#endif
653 pos++; 651 pos++;
654} 652}
655 653
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 53dd5be4c0..13ce172f67 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -129,10 +129,11 @@ bool exit_tsr(bool reenter)
129 rb->lcd_clear_display(); 129 rb->lcd_clear_display();
130 rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); 130 rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running.");
131 rb->lcd_puts_scroll(0, 1, "Press OFF to cancel the test"); 131 rb->lcd_puts_scroll(0, 1, "Press OFF to cancel the test");
132 rb->lcd_puts_scroll(0, 2, "Anything else will resume");
133#ifdef HAVE_LCD_BITMAP 132#ifdef HAVE_LCD_BITMAP
134 rb->lcd_update(); 133 rb->lcd_puts_scroll(0, 2, "Anything else will resume");
135#endif 134#endif
135 rb->lcd_update();
136
136 if (rb->button_get(true) != BATTERY_OFF) 137 if (rb->button_get(true) != BATTERY_OFF)
137 exit = false; 138 exit = false;
138 if (exit) 139 if (exit)
@@ -369,21 +370,24 @@ int main(void)
369 int button, fd; 370 int button, fd;
370 bool on = false; 371 bool on = false;
371#ifdef HAVE_LCD_BITMAP 372#ifdef HAVE_LCD_BITMAP
373 int i;
372 const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, 374 const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG,
373 "for more info", "PLAY - start", "OFF - quit" }; 375 "for more info", "PLAY - start", "OFF - quit" };
374#endif 376#endif
375 rb->lcd_clear_display(); 377 rb->lcd_clear_display();
376 378
377#ifdef HAVE_LCD_BITMAP 379#ifdef HAVE_LCD_BITMAP
378 int i;
379
380 rb->lcd_clear_display(); 380 rb->lcd_clear_display();
381 rb->lcd_setfont(FONT_SYSFIXED); 381 rb->lcd_setfont(FONT_SYSFIXED);
382 382
383 for(i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) 383 for(i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++)
384 put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1); 384 put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1);
385 385#else
386 rb->lcd_puts_scroll(0, 0, "Batt.Bench.");
387 rb->lcd_puts_scroll(0, 1, "PLAY/STOP");
388#endif
386 rb->lcd_update(); 389 rb->lcd_update();
390
387#ifdef HAVE_REMOTE_LCD 391#ifdef HAVE_REMOTE_LCD
388 rb->lcd_remote_clear_display(); 392 rb->lcd_remote_clear_display();
389 put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0); 393 put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0);
@@ -394,11 +398,6 @@ int main(void)
394 rb->lcd_remote_update(); 398 rb->lcd_remote_update();
395#endif 399#endif
396 400
397#else
398 rb->lcd_puts_scroll(0, 0, "Batt.Bench.");
399 rb->lcd_puts_scroll(0, 1, "PLAY/STOP");
400#endif
401
402 do 401 do
403 { 402 {
404 button = rb->button_get(true); 403 button = rb->button_get(true);
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index acc35c3788..086245e75c 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -369,9 +369,8 @@ static int run_timer(int nr)
369 (unsigned char *)show_time((max_ticks-ticks+HZ-1)/HZ)); 369 (unsigned char *)show_time((max_ticks-ticks+HZ-1)/HZ));
370 } 370 }
371 } 371 }
372#ifdef HAVE_LCD_BITMAP
373 rb->lcd_update(); 372 rb->lcd_update();
374#endif 373
375 button = rb->button_get(false); 374 button = rb->button_get(false);
376 switch (button) { 375 switch (button) {
377 /* OFF/ON key to exit */ 376 /* OFF/ON key to exit */
@@ -493,9 +492,8 @@ static int chessclock_set_int(char* string,
493 else 492 else
494 rb->snprintf(str, sizeof str,"%d", *variable); 493 rb->snprintf(str, sizeof str,"%d", *variable);
495 rb->lcd_puts(0, FIRST_LINE+1, (unsigned char *)str); 494 rb->lcd_puts(0, FIRST_LINE+1, (unsigned char *)str);
496#ifdef HAVE_LCD_BITMAP
497 rb->lcd_update(); 495 rb->lcd_update();
498#endif 496
499 button = rb->button_get(true); 497 button = rb->button_get(true);
500 switch(button) { 498 switch(button) {
501 case CHC_SETTINGS_INC: 499 case CHC_SETTINGS_INC:
@@ -562,9 +560,8 @@ static int simple_menu(int nr, unsigned char **strarr)
562 if (show<0) 560 if (show<0)
563 show=nr-1; 561 show=nr-1;
564 rb->lcd_puts_scroll(0, FIRST_LINE, strarr[show]); 562 rb->lcd_puts_scroll(0, FIRST_LINE, strarr[show]);
565#ifdef HAVE_LCD_BITMAP
566 rb->lcd_update(); 563 rb->lcd_update();
567#endif 564
568 button = rb->button_get(true); 565 button = rb->button_get(true);
569 switch(button) { 566 switch(button) {
570 case CHC_SETTINGS_INC: 567 case CHC_SETTINGS_INC:
diff --git a/apps/plugins/credits.c b/apps/plugins/credits.c
index cb75156d73..0bd2a511cd 100644
--- a/apps/plugins/credits.c
+++ b/apps/plugins/credits.c
@@ -90,7 +90,6 @@ void roll_credits(void)
90 else 90 else
91 rb->lcd_puts(x, line, credits[name]); 91 rb->lcd_puts(x, line, credits[name]);
92 92
93
94 if (++name >= numnames) 93 if (++name >= numnames)
95 break; 94 break;
96 95
@@ -104,6 +103,8 @@ void roll_credits(void)
104 x += MAX(len/2 + 2, len - new_len/2 + 1); 103 x += MAX(len/2 + 2, len - new_len/2 + 1);
105 len = new_len; 104 len = new_len;
106 } 105 }
106 rb->lcd_update();
107
107 /* abort on keypress */ 108 /* abort on keypress */
108 if (rb->button_get_w_tmo(HZ/8) & BUTTON_REL) 109 if (rb->button_get_w_tmo(HZ/8) & BUTTON_REL)
109 return; 110 return;
diff --git a/apps/plugins/dice.c b/apps/plugins/dice.c
index cfeceae539..39392f1ac5 100644
--- a/apps/plugins/dice.c
+++ b/apps/plugins/dice.c
@@ -214,9 +214,7 @@ static void print_dice(const int dice[], const int total) {
214 rb->lcd_puts(0,START_DICE_ROW+(++row)," "); 214 rb->lcd_puts(0,START_DICE_ROW+(++row)," ");
215 } 215 }
216#endif 216#endif
217#ifdef HAVE_LCD_BITMAP
218 rb->lcd_update(); 217 rb->lcd_update();
219#endif
220} 218}
221static bool dice_menu(int *num_dice, int *side_index) { 219static bool dice_menu(int *num_dice, int *side_index) {
222 int selection; 220 int selection;
diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c
index cdb7c94a3a..1ec9bce948 100644
--- a/apps/plugins/dict.c
+++ b/apps/plugins/dict.c
@@ -301,10 +301,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
301 break; 301 break;
302 } 302 }
303 } 303 }
304
305#ifdef HAVE_LCD_BITMAP
306 rb->lcd_update(); 304 rb->lcd_update();
307#endif
308 305
309 /* wait for keypress */ 306 /* wait for keypress */
310 while(rb->button_get(true) != LP_QUIT) 307 while(rb->button_get(true) != LP_QUIT)
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c
index d1f40cf9f8..ca4fb9b830 100644
--- a/apps/plugins/disktidy.c
+++ b/apps/plugins/disktidy.c
@@ -87,8 +87,8 @@ void tidy_lcd_status(const char *name, int *removed)
87 rb->snprintf(text, 24, "Cleaned up %d items", *removed); 87 rb->snprintf(text, 24, "Cleaned up %d items", *removed);
88#ifdef HAVE_LCD_BITMAP 88#ifdef HAVE_LCD_BITMAP
89 rb->lcd_puts(0, 2, text); 89 rb->lcd_puts(0, 2, text);
90 rb->lcd_update();
91#endif 90#endif
91 rb->lcd_update();
92} 92}
93 93
94void tidy_get_absolute_path(struct dirent *entry, char *fullname, 94void tidy_get_absolute_path(struct dirent *entry, char *fullname,
diff --git a/apps/plugins/euroconverter.c b/apps/plugins/euroconverter.c
index 97ec21dd98..224fb85703 100644
--- a/apps/plugins/euroconverter.c
+++ b/apps/plugins/euroconverter.c
@@ -290,14 +290,15 @@ static void display(longlong_t euro, longlong_t home, bool pos)
290 } 290 }
291 else 291 else
292 rb->lcd_puts_scroll(1,1,str); 292 rb->lcd_puts_scroll(1,1,str);
293
294 rb->lcd_update();
293} 295}
294 296
295 297
296/* Show country Abbreviation */ 298/* Show country Abbreviation */
297static void show_abbrev(void) 299static void show_abbrev(void)
298{ 300{
299 rb->lcd_puts(2,1,abbrev_str[country]); 301 rb->splash(HZ*3/4,abbrev_str[country]);
300 rb->sleep(HZ*3/4);
301} 302}
302 303
303 304
@@ -325,6 +326,7 @@ static void currency_menu(void)
325 { 326 {
326 rb->lcd_puts(0,0,"Currency:"); 327 rb->lcd_puts(0,0,"Currency:");
327 rb->lcd_puts(0,1,currency_str[c]); 328 rb->lcd_puts(0,1,currency_str[c]);
329 rb->lcd_update();
328 switch (rb->button_get(true)) 330 switch (rb->button_get(true))
329 { 331 {
330 case BUTTON_RIGHT|BUTTON_REL: 332 case BUTTON_RIGHT|BUTTON_REL:
@@ -361,6 +363,7 @@ static int euro_menu(void)
361 rb->lcd_puts(0,0," Currency"); 363 rb->lcd_puts(0,0," Currency");
362 rb->lcd_puts(0,1," Exit"); 364 rb->lcd_puts(0,1," Exit");
363 rb->lcd_putc(0,c,0xe110); 365 rb->lcd_putc(0,c,0xe110);
366 rb->lcd_update();
364 367
365 switch (rb->button_get(true)) 368 switch (rb->button_get(true))
366 { 369 {
@@ -394,6 +397,7 @@ static void euro_exit(void *parameter)
394 397
395 //Clear the screen 398 //Clear the screen
396 rb->lcd_clear_display(); 399 rb->lcd_clear_display();
400 rb->lcd_update();
397} 401}
398 402
399 403
diff --git a/apps/plugins/firmware_flash.c b/apps/plugins/firmware_flash.c
index 073667e73f..a0fac4258e 100644
--- a/apps/plugins/firmware_flash.c
+++ b/apps/plugins/firmware_flash.c
@@ -848,6 +848,7 @@ void ShowFlashInfo(tFlashInfo* pInfo)
848 { 848 {
849 rb->lcd_puts_scroll(0, 0, "Flash: M=? D=?"); 849 rb->lcd_puts_scroll(0, 0, "Flash: M=? D=?");
850 rb->lcd_puts_scroll(0, 1, "Impossible to program"); 850 rb->lcd_puts_scroll(0, 1, "Impossible to program");
851 rb->lcd_update();
851 WaitForButton(); 852 WaitForButton();
852 } 853 }
853 else 854 else
@@ -860,10 +861,12 @@ void ShowFlashInfo(tFlashInfo* pInfo)
860 { 861 {
861 rb->snprintf(buf, sizeof(buf), "Size: %d KB", pInfo->size / 1024); 862 rb->snprintf(buf, sizeof(buf), "Size: %d KB", pInfo->size / 1024);
862 rb->lcd_puts_scroll(0, 1, buf); 863 rb->lcd_puts_scroll(0, 1, buf);
864 rb->lcd_update();
863 } 865 }
864 else 866 else
865 { 867 {
866 rb->lcd_puts_scroll(0, 1, "Unsupported chip"); 868 rb->lcd_puts_scroll(0, 1, "Unsupported chip");
869 rb->lcd_update();
867 WaitForButton(); 870 WaitForButton();
868 } 871 }
869 } 872 }
@@ -941,7 +944,8 @@ void DoUserDialog(char* filename)
941 944
942 rb->lcd_puts_scroll(0, 0, filename); 945 rb->lcd_puts_scroll(0, 0, filename);
943 rb->lcd_puts_scroll(0, 1, "[Menu] to check"); 946 rb->lcd_puts_scroll(0, 1, "[Menu] to check");
944 947 rb->lcd_update();
948
945 button = WaitForButton(); 949 button = WaitForButton();
946 if (button != BUTTON_MENU) 950 if (button != BUTTON_MENU)
947 { 951 {
@@ -950,7 +954,8 @@ void DoUserDialog(char* filename)
950 954
951 rb->lcd_clear_display(); 955 rb->lcd_clear_display();
952 rb->lcd_puts(0, 0, "Checking..."); 956 rb->lcd_puts(0, 0, "Checking...");
953 957 rb->lcd_update();
958
954 rc = CheckFirmwareFile(filename, FlashInfo.size, is_romless); 959 rc = CheckFirmwareFile(filename, FlashInfo.size, is_romless);
955 rb->lcd_puts(0, 0, "Checked:"); 960 rb->lcd_puts(0, 0, "Checked:");
956 switch (rc) 961 switch (rc)
@@ -989,6 +994,7 @@ void DoUserDialog(char* filename)
989 rb->lcd_puts_scroll(0, 0, "Check failed."); 994 rb->lcd_puts_scroll(0, 0, "Check failed.");
990 break; 995 break;
991 } 996 }
997 rb->lcd_update();
992 998
993 rb->sleep(HZ*3); 999 rb->sleep(HZ*3);
994 1000
@@ -996,6 +1002,7 @@ void DoUserDialog(char* filename)
996 { 1002 {
997 rb->lcd_puts_scroll(0, 0, "[On] to program,"); 1003 rb->lcd_puts_scroll(0, 0, "[On] to program,");
998 rb->lcd_puts_scroll(0, 1, "other key to exit."); 1004 rb->lcd_puts_scroll(0, 1, "other key to exit.");
1005 rb->lcd_update();
999 } 1006 }
1000 else 1007 else
1001 { /* error occured */ 1008 { /* error occured */
@@ -1012,7 +1019,8 @@ void DoUserDialog(char* filename)
1012 rb->lcd_clear_display(); 1019 rb->lcd_clear_display();
1013 rb->lcd_puts_scroll(0, 0, "Are you sure?"); 1020 rb->lcd_puts_scroll(0, 0, "Are you sure?");
1014 rb->lcd_puts_scroll(0, 1, "[+] to proceed."); 1021 rb->lcd_puts_scroll(0, 1, "[+] to proceed.");
1015 1022 rb->lcd_update();
1023
1016 button = WaitForButton(); 1024 button = WaitForButton();
1017 1025
1018 if (button != BUTTON_RIGHT) 1026 if (button != BUTTON_RIGHT)
@@ -1022,7 +1030,8 @@ void DoUserDialog(char* filename)
1022 1030
1023 rb->lcd_clear_display(); 1031 rb->lcd_clear_display();
1024 rb->lcd_puts_scroll(0, 0, "Programming..."); 1032 rb->lcd_puts_scroll(0, 0, "Programming...");
1025 1033 rb->lcd_update();
1034
1026 rc = ProgramFirmwareFile(filename, FlashInfo.size); 1035 rc = ProgramFirmwareFile(filename, FlashInfo.size);
1027 1036
1028 if (rc) 1037 if (rc)
@@ -1031,12 +1040,14 @@ void DoUserDialog(char* filename)
1031 rb->lcd_puts_scroll(0, 0, "Programming failed!"); 1040 rb->lcd_puts_scroll(0, 0, "Programming failed!");
1032 rb->snprintf(buf, sizeof(buf), "%d errors", rc); 1041 rb->snprintf(buf, sizeof(buf), "%d errors", rc);
1033 rb->lcd_puts_scroll(0, 1, buf); 1042 rb->lcd_puts_scroll(0, 1, buf);
1043 rb->lcd_update();
1034 WaitForButton(); 1044 WaitForButton();
1035 } 1045 }
1036 1046
1037 rb->lcd_clear_display(); 1047 rb->lcd_clear_display();
1038 rb->lcd_puts_scroll(0, 0, "Verifying..."); 1048 rb->lcd_puts_scroll(0, 0, "Verifying...");
1039 1049 rb->lcd_update();
1050
1040 rc = VerifyFirmwareFile(filename); 1051 rc = VerifyFirmwareFile(filename);
1041 1052
1042 rb->lcd_clear_display(); 1053 rb->lcd_clear_display();
@@ -1052,6 +1063,7 @@ void DoUserDialog(char* filename)
1052 } 1063 }
1053 1064
1054 rb->lcd_puts_scroll(0, 1, "Press any key to exit."); 1065 rb->lcd_puts_scroll(0, 1, "Press any key to exit.");
1066 rb->lcd_update();
1055 WaitForButton(); 1067 WaitForButton();
1056} 1068}
1057 1069
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index 91afc9eca7..9bff0b09a3 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -323,9 +323,7 @@ static void move_cursor(int x, int y)
323 + ( ( y + 4 + cursor_pos/5 )%4 )*5; 323 + ( ( y + 4 + cursor_pos/5 )%4 )*5;
324 draw_cursor(); 324 draw_cursor();
325 } 325 }
326#ifdef HAVE_LCD_BITMAP
327 rb->lcd_update(); 326 rb->lcd_update();
328#endif
329} 327}
330 328
331/* initialize the board */ 329/* initialize the board */
@@ -339,9 +337,8 @@ static void flipit_init(void)
339 toggle[i]=1; 337 toggle[i]=1;
340 draw_spot(i); 338 draw_spot(i);
341 } 339 }
342#ifdef HAVE_LCD_BITMAP
343 rb->lcd_update(); 340 rb->lcd_update();
344#endif 341
345 for (i=0; i<20; i++) { 342 for (i=0; i<20; i++) {
346 cursor_pos = (rb->rand() % 20); 343 cursor_pos = (rb->rand() % 20);
347 flipit_toggle(); 344 flipit_toggle();
@@ -351,9 +348,7 @@ static void flipit_init(void)
351 draw_cursor(); 348 draw_cursor();
352 moves = 0; 349 moves = 0;
353 draw_info_panel(); 350 draw_info_panel();
354#ifdef HAVE_LCD_BITMAP
355 rb->lcd_update(); 351 rb->lcd_update();
356#endif
357} 352}
358 353
359/* the main game loop */ 354/* the main game loop */
@@ -392,9 +387,7 @@ static bool flipit_loop(void)
392 cursor_pos = i; 387 cursor_pos = i;
393 flipit_toggle(); 388 flipit_toggle();
394 draw_cursor(); 389 draw_cursor();
395#ifdef HAVE_LCD_BITMAP
396 rb->lcd_update(); 390 rb->lcd_update();
397#endif
398 rb->sleep(HZ*2/3); 391 rb->sleep(HZ*2/3);
399 } 392 }
400 } 393 }
@@ -412,9 +405,7 @@ static bool flipit_loop(void)
412 cursor_pos = i; 405 cursor_pos = i;
413 flipit_toggle(); 406 flipit_toggle();
414 draw_cursor(); 407 draw_cursor();
415#ifdef HAVE_LCD_BITMAP
416 rb->lcd_update(); 408 rb->lcd_update();
417#endif
418 break; 409 break;
419 } 410 }
420 } 411 }
@@ -429,9 +420,7 @@ static bool flipit_loop(void)
429 if (!flipit_finished()) { 420 if (!flipit_finished()) {
430 flipit_toggle(); 421 flipit_toggle();
431 draw_cursor(); 422 draw_cursor();
432#ifdef HAVE_LCD_BITMAP
433 rb->lcd_update(); 423 rb->lcd_update();
434#endif
435 } 424 }
436 break; 425 break;
437 426
@@ -546,9 +535,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
546 spots[i]=1; 535 spots[i]=1;
547 draw_spot(i); 536 draw_spot(i);
548 } 537 }
549#ifdef HAVE_LCD_BITMAP
550 rb->lcd_update(); 538 rb->lcd_update();
551#endif
552 rb->sleep(HZ*3/2); 539 rb->sleep(HZ*3/2);
553 rb->srand(*rb->current_tick); 540 rb->srand(*rb->current_tick);
554 541
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c
index 37ee4514e7..b0a6265311 100644
--- a/apps/plugins/jackpot.c
+++ b/apps/plugins/jackpot.c
@@ -78,6 +78,7 @@ static void jackpot_exit(void *parameter)
78 78
79 /* Clear the screen */ 79 /* Clear the screen */
80 rb->lcd_clear_display(); 80 rb->lcd_clear_display();
81 rb->lcd_update();
81} 82}
82 83
83 84
@@ -115,13 +116,15 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
115 rb->lcd_putc(9,0,h2); rb->lcd_putc(10,0,h1); 116 rb->lcd_putc(9,0,h2); rb->lcd_putc(10,0,h1);
116 rb->lcd_puts(0,1," V1.1 "); 117 rb->lcd_puts(0,1," V1.1 ");
117 rb->lcd_putc(1,1,h3); rb->lcd_putc(9,1,h3); 118 rb->lcd_putc(1,1,h3); rb->lcd_putc(9,1,h3);
119 rb->lcd_update();
118 rb->sleep(HZ*2); 120 rb->sleep(HZ*2);
119 rb->lcd_clear_display();
120 121
121 /*First display*/ 122 /*First display*/
123 rb->lcd_clear_display();
122 rb->snprintf(str,sizeof(str),"[ ]$%d",g); 124 rb->snprintf(str,sizeof(str),"[ ]$%d",g);
123 rb->lcd_puts(0,0,str); 125 rb->lcd_puts(0,0,str);
124 rb->lcd_puts_scroll(0,1,"PLAY to begin"); 126 rb->lcd_puts_scroll(0,1,"PLAY to begin");
127 rb->lcd_update();
125 128
126 /*Empty the event queue*/ 129 /*Empty the event queue*/
127 rb->button_clear_queue(); 130 rb->button_clear_queue();
@@ -165,6 +168,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
165 168
166 /*Clear the Second line*/ 169 /*Clear the Second line*/
167 rb->lcd_puts_scroll(0,1,"Good luck"); 170 rb->lcd_puts_scroll(0,1,"Good luck");
171 rb->lcd_update();
168 172
169 /*GO !!!!*/ 173 /*GO !!!!*/
170 if ( go && !exit ) 174 if ( go && !exit )
@@ -188,6 +192,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
188 rb->lcd_putc(1,0, h1); 192 rb->lcd_putc(1,0, h1);
189 rb->lcd_putc(2,0, h2); 193 rb->lcd_putc(2,0, h2);
190 rb->lcd_putc(3,0, h3); 194 rb->lcd_putc(3,0, h3);
195 rb->lcd_update();
191 for(i=0;i<3;i++) 196 for(i=0;i<3;i++)
192 { 197 {
193 if (n[i]>=0) 198 if (n[i]>=0)
@@ -268,6 +273,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
268 rb->snprintf(str,sizeof(str),"You win %d$",j); 273 rb->snprintf(str,sizeof(str),"You win %d$",j);
269 rb->lcd_puts(0,1,str); 274 rb->lcd_puts(0,1,str);
270 } 275 }
276 rb->lcd_update();
271 } 277 }
272 } 278 }
273 279
diff --git a/apps/plugins/lib/playergfx.c b/apps/plugins/lib/playergfx.c
index 0e0a5d3788..8853078fa1 100644
--- a/apps/plugins/lib/playergfx.c
+++ b/apps/plugins/lib/playergfx.c
@@ -99,6 +99,8 @@ void pgfx_update(void)
99 99
100 for (i = 0; i < char_width * char_height; i++) 100 for (i = 0; i < char_width * char_height; i++)
101 pgfx_rb->lcd_define_pattern(gfx_chars[i], gfx_buffer + 7 * i); 101 pgfx_rb->lcd_define_pattern(gfx_chars[i], gfx_buffer + 7 * i);
102
103 pgfx_rb->lcd_update();
102} 104}
103 105
104/*** Parameter handling ***/ 106/*** Parameter handling ***/
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index 168e68cbb9..408588e6c1 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -312,12 +312,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
312#else 312#else
313 if (cpos != old_cpos) { 313 if (cpos != old_cpos) {
314 rb->lcd_clear_display(); 314 rb->lcd_clear_display();
315 pgfx_update();
316 pgfx_display(cpos, 0); 315 pgfx_display(cpos, 0);
317 old_cpos = cpos; 316 old_cpos = cpos;
318 } 317 }
319 else 318 pgfx_update();
320 pgfx_update();
321#endif 319#endif
322 rb->sleep(HZ/timer); 320 rb->sleep(HZ/timer);
323 321
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index cfbed76b5a..3361ce32bc 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -778,8 +778,8 @@ void draw_display(void)
778 rb->lcd_puts(0,2,METRONOME_MSG_START); 778 rb->lcd_puts(0,2,METRONOME_MSG_START);
779 else 779 else
780 rb->lcd_puts(0,2,METRONOME_MSG_STOP); 780 rb->lcd_puts(0,2,METRONOME_MSG_STOP);
781 rb->lcd_update();
782#endif 781#endif
782 rb->lcd_update();
783#ifdef HAVE_REMOTE_LCD 783#ifdef HAVE_REMOTE_LCD
784 rb->lcd_remote_drawline(0, 12, 111, 12); 784 rb->lcd_remote_drawline(0, 12, 111, 12);
785 if(sound_paused) 785 if(sound_paused)
diff --git a/apps/plugins/nim.c b/apps/plugins/nim.c
index 9089cad00a..b13cfe415b 100644
--- a/apps/plugins/nim.c
+++ b/apps/plugins/nim.c
@@ -66,6 +66,7 @@ static struct plugin_api* rb;
66static void impossible(void) 66static void impossible(void)
67{ 67{
68 rb->lcd_puts(0,1,"Impossible!"); 68 rb->lcd_puts(0,1,"Impossible!");
69 rb->lcd_update();
69 rb->sleep(HZ); 70 rb->sleep(HZ);
70 return; 71 return;
71} 72}
@@ -76,6 +77,7 @@ static void lose(void)
76 rb->lcd_define_pattern(hsmile,smile); 77 rb->lcd_define_pattern(hsmile,smile);
77 rb->lcd_puts(0,1,"You Win!!"); 78 rb->lcd_puts(0,1,"You Win!!");
78 rb->lcd_putc(8,1,hsmile); 79 rb->lcd_putc(8,1,hsmile);
80 rb->lcd_update();
79 end=true; 81 end=true;
80 rb->sleep(HZ*2); 82 rb->sleep(HZ*2);
81 return; 83 return;
@@ -88,6 +90,7 @@ static void win(void)
88 rb->lcd_define_pattern(hcry,cry); 90 rb->lcd_define_pattern(hcry,cry);
89 rb->lcd_puts(0,1,"You Lose!!"); 91 rb->lcd_puts(0,1,"You Lose!!");
90 rb->lcd_putc(9,1,hcry); 92 rb->lcd_putc(9,1,hcry);
93 rb->lcd_update();
91 end=true; 94 end=true;
92 rb->sleep(HZ*2); 95 rb->sleep(HZ*2);
93 return; 96 return;
@@ -103,7 +106,7 @@ static void display_first_line(int x)
103 rb->lcd_puts(0,0,str); 106 rb->lcd_puts(0,0,str);
104 107
105 rb->lcd_define_pattern(h1,pattern3); 108 rb->lcd_define_pattern(h1,pattern3);
106 for (i=0;i<x/3;i++) 109 for (i=0;i<x/3;i++)
107 rb->lcd_putc(i,0,h1); 110 rb->lcd_putc(i,0,h1);
108 111
109 if (x%3==2) 112 if (x%3==2)
@@ -131,6 +134,7 @@ static void nim_exit(void *parameter)
131 134
132 /*Clear the screen*/ 135 /*Clear the screen*/
133 rb->lcd_clear_display(); 136 rb->lcd_clear_display();
137 rb->lcd_update();
134} 138}
135 139
136/* this is the plugin entry point */ 140/* this is the plugin entry point */
@@ -183,6 +187,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
183 187
184 rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y); 188 rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y);
185 rb->lcd_puts(0,1,str); 189 rb->lcd_puts(0,1,str);
190 rb->lcd_update();
186 191
187 go=false; 192 go=false;
188 while (!go) 193 while (!go)
@@ -221,6 +226,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
221 display_first_line(x); 226 display_first_line(x);
222 rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y); 227 rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y);
223 rb->lcd_puts(0,1,str); 228 rb->lcd_puts(0,1,str);
229 rb->lcd_update();
224 } 230 }
225 231
226 if ( (y==0) && (x<21)) 232 if ( (y==0) && (x<21))
@@ -281,6 +287,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
281 x-=y; 287 x-=y;
282 rb->snprintf(str,sizeof(str),"I take=%d",y); 288 rb->snprintf(str,sizeof(str),"I take=%d",y);
283 rb->lcd_puts(0,1,str); 289 rb->lcd_puts(0,1,str);
290 rb->lcd_update();
284 rb->sleep(HZ); 291 rb->sleep(HZ);
285 } 292 }
286 if ((x==1)&&(!end)) 293 if ((x==1)&&(!end))
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c
index e9c57c049b..ee7ff86cb7 100644
--- a/apps/plugins/properties.c
+++ b/apps/plugins/properties.c
@@ -173,9 +173,8 @@ static bool _dir_properties(DPS* dps)
173 rb->snprintf(dps->tstr, 64, "Size: %s", 173 rb->snprintf(dps->tstr, 64, "Size: %s",
174 filesize2string(dps->bc, dps->tstr2, 64)); 174 filesize2string(dps->bc, dps->tstr2, 64));
175 rb->lcd_puts(0,5,dps->tstr); 175 rb->lcd_puts(0,5,dps->tstr);
176#ifdef HAVE_LCD_BITMAP
177 rb->lcd_update(); 176 rb->lcd_update();
178#endif 177
179 /* recursion */ 178 /* recursion */
180 result = _dir_properties(dps); 179 result = _dir_properties(dps);
181 } 180 }
@@ -302,9 +301,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
302 rb->lcd_clear_display(); 301 rb->lcd_clear_display();
303 rb->lcd_puts(0,0,"File/Dir not found:"); 302 rb->lcd_puts(0,0,"File/Dir not found:");
304 rb->lcd_puts(0,1,(char*)file); 303 rb->lcd_puts(0,1,(char*)file);
305#ifdef HAVE_LCD_BITMAP
306 rb->lcd_update(); 304 rb->lcd_update();
307#endif 305
308 rb->action_userabort(TIMEOUT_BLOCK); 306 rb->action_userabort(TIMEOUT_BLOCK);
309 return PLUGIN_OK; 307 return PLUGIN_OK;
310 } 308 }
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c
index 3b387537b4..e300675cdf 100644
--- a/apps/plugins/random_folder_advance_config.c
+++ b/apps/plugins/random_folder_advance_config.c
@@ -59,22 +59,16 @@ struct file_format *list = NULL;
59void update_screen(bool clear) 59void update_screen(bool clear)
60{ 60{
61 char buf[15]; 61 char buf[15];
62#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */
63 int i; 62 int i;
63
64 rb->snprintf(buf,sizeof(buf),"Folders: %d",dirs_count);
64 FOR_NB_SCREENS(i) 65 FOR_NB_SCREENS(i)
65 { 66 {
66 rb->snprintf(buf,15,"Folders: %d",dirs_count);
67 if(clear) 67 if(clear)
68 rb->screens[i]->clear_display(); 68 rb->screens[i]->clear_display();
69 rb->screens[i]->putsxy(0,0,buf); 69 rb->screens[i]->putsxy(0,0,buf);
70 rb->screens[i]->update(); 70 rb->screens[i]->update();
71 } 71 }
72#else
73 rb->snprintf(buf,15,"Folders: %d",dirs_count);
74 if(clear)
75 rb->lcd_clear_display();
76 rb->lcd_puts(0,0,buf);
77#endif
78} 72}
79 73
80void traversedir(char* location, char* name) 74void traversedir(char* location, char* name)
diff --git a/apps/plugins/rockbox_flash.c b/apps/plugins/rockbox_flash.c
index deccb47bb9..8edfd017cc 100644
--- a/apps/plugins/rockbox_flash.c
+++ b/apps/plugins/rockbox_flash.c
@@ -893,6 +893,7 @@ void DoUserDialog(char* filename)
893 { 893 {
894 rb->lcd_puts_scroll(0, 0, "Hint: You're not using the latest bootloader. A full reflash is recommended, but not required."); 894 rb->lcd_puts_scroll(0, 0, "Hint: You're not using the latest bootloader. A full reflash is recommended, but not required.");
895 rb->lcd_puts_scroll(0, 1, "Press [Menu] to ignore"); 895 rb->lcd_puts_scroll(0, 1, "Press [Menu] to ignore");
896 rb->lcd_update();
896 897
897 if (WaitForButton() != BUTTON_MENU) 898 if (WaitForButton() != BUTTON_MENU)
898 { 899 {
@@ -902,6 +903,7 @@ void DoUserDialog(char* filename)
902 } 903 }
903 904
904 rb->lcd_puts(0, 0, "Checking..."); 905 rb->lcd_puts(0, 0, "Checking...");
906 rb->lcd_update();
905 907
906 space = FlashInfo.size - (pos-FB + sizeof(ImageHeader)); 908 space = FlashInfo.size - (pos-FB + sizeof(ImageHeader));
907 /* size minus start */ 909 /* size minus start */
@@ -941,6 +943,7 @@ void DoUserDialog(char* filename)
941 rb->lcd_puts_scroll(0, 1, "Check failed."); 943 rb->lcd_puts_scroll(0, 1, "Check failed.");
942 break; 944 break;
943 } 945 }
946 rb->lcd_update();
944 947
945 if (rc == eOK) 948 if (rc == eOK)
946 { /* was OK */ 949 { /* was OK */
@@ -955,6 +958,7 @@ void DoUserDialog(char* filename)
955 rb->lcd_puts_scroll(0, 0, "Flash failed."); 958 rb->lcd_puts_scroll(0, 0, "Flash failed.");
956 rb->lcd_puts_scroll(0, 1, "Any key to exit."); 959 rb->lcd_puts_scroll(0, 1, "Any key to exit.");
957 } 960 }
961 rb->lcd_update();
958 962
959 button = WaitForButton(); 963 button = WaitForButton();
960 if (rc != eOK || button != BUTTON_ON) 964 if (rc != eOK || button != BUTTON_ON)
@@ -972,6 +976,7 @@ void DoUserDialog(char* filename)
972 976
973 rb->lcd_clear_display(); 977 rb->lcd_clear_display();
974 rb->lcd_puts_scroll(0, 0, "Programming..."); 978 rb->lcd_puts_scroll(0, 0, "Programming...");
979 rb->lcd_update();
975 980
976 rc = ProgramImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size); 981 rc = ProgramImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size);
977 if (rc) 982 if (rc)
@@ -980,11 +985,13 @@ void DoUserDialog(char* filename)
980 rb->snprintf(buf, sizeof(buf), "%d errors", rc); 985 rb->snprintf(buf, sizeof(buf), "%d errors", rc);
981 rb->lcd_puts_scroll(0, 0, "Programming failed!"); 986 rb->lcd_puts_scroll(0, 0, "Programming failed!");
982 rb->lcd_puts_scroll(0, 1, buf); 987 rb->lcd_puts_scroll(0, 1, buf);
988 rb->lcd_update();
983 button = WaitForButton(); 989 button = WaitForButton();
984 } 990 }
985 991
986 rb->lcd_clear_display(); 992 rb->lcd_clear_display();
987 rb->lcd_puts_scroll(0, 0, "Verifying..."); 993 rb->lcd_puts_scroll(0, 0, "Verifying...");
994 rb->lcd_update();
988 995
989 rc = VerifyImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size); 996 rc = VerifyImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size);
990 997
@@ -992,12 +999,14 @@ void DoUserDialog(char* filename)
992 if (rc == 0) 999 if (rc == 0)
993 { 1000 {
994 rb->lcd_puts(0, 0, "Verify OK."); 1001 rb->lcd_puts(0, 0, "Verify OK.");
1002 rb->lcd_update();
995 } 1003 }
996 else 1004 else
997 { 1005 {
998 rb->snprintf(buf, sizeof(buf), "Verify fail! %d errors", rc); 1006 rb->snprintf(buf, sizeof(buf), "Verify fail! %d errors", rc);
999 rb->lcd_puts_scroll(0, 0, buf); 1007 rb->lcd_puts_scroll(0, 0, buf);
1000 rb->lcd_puts_scroll(0, 1, "Use safe image if booting hangs: [-] during power-on"); 1008 rb->lcd_puts_scroll(0, 1, "Use safe image if booting hangs: [-] during power-on");
1009 rb->lcd_update();
1001 button = WaitForButton(); 1010 button = WaitForButton();
1002 } 1011 }
1003} 1012}
diff --git a/apps/plugins/searchengine/searchengine.h b/apps/plugins/searchengine/searchengine.h
index 18b68a8b35..07248ef37e 100644
--- a/apps/plugins/searchengine/searchengine.h
+++ b/apps/plugins/searchengine/searchengine.h
@@ -34,7 +34,8 @@ rb->lcd_update()
34#define PUTS(str) do { \ 34#define PUTS(str) do { \
35 rb->lcd_puts(0, y, str); \ 35 rb->lcd_puts(0, y, str); \
36 y = (y + 1) % 2; \ 36 y = (y + 1) % 2; \
37} while (0); 37} while (0); \
38rb->lcd_update()
38#endif 39#endif
39 40
40extern struct plugin_api* rb; 41extern struct plugin_api* rb;
diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c
index 5625f7247a..5b6e76cb81 100644
--- a/apps/plugins/stats.c
+++ b/apps/plugins/stats.c
@@ -24,9 +24,6 @@ static struct plugin_api* rb;
24static int files, dirs, musicfiles; 24static int files, dirs, musicfiles;
25static int lasttick; 25static int lasttick;
26static bool abort; 26static bool abort;
27#ifdef HAVE_LCD_BITMAP
28static int fontwidth, fontheight;
29#endif
30 27
31#if CONFIG_KEYPAD == PLAYER_PAD 28#if CONFIG_KEYPAD == PLAYER_PAD
32#define STATS_STOP BUTTON_STOP 29#define STATS_STOP BUTTON_STOP
@@ -70,43 +67,39 @@ const char *music_exts[] = {"mp3","mp2","mp1","mpa","ogg",
70 67
71void prn(const char *str, int y) 68void prn(const char *str, int y)
72{ 69{
73#ifdef HAVE_LCD_BITMAP 70 rb->lcd_puts(0,y,str);
74 rb->lcd_putsxy(0,y,str);
75#ifdef HAVE_REMOTE_LCD 71#ifdef HAVE_REMOTE_LCD
76 rb->lcd_remote_putsxy(0,y,str); 72 rb->lcd_remote_puts(0,y,str);
77#endif
78#else
79 rb->lcd_puts(0,y,str);
80#endif 73#endif
81} 74}
82 75
83void update_screen(void) 76void update_screen(void)
84{ 77{
85 char buf[15]; 78 char buf[15];
86#ifdef HAVE_LCD_BITMAP 79
87 rb->lcd_clear_display(); 80 rb->lcd_clear_display();
88#ifdef HAVE_REMOTE_LCD 81#ifdef HAVE_REMOTE_LCD
89 rb->lcd_remote_clear_display(); 82 rb->lcd_remote_clear_display();
90#endif 83#endif
91 84
85#ifdef HAVE_LCD_BITMAP
92 rb->snprintf(buf, sizeof(buf), "Files: %d", files); 86 rb->snprintf(buf, sizeof(buf), "Files: %d", files);
93 prn(buf,0); 87 prn(buf,0);
94
95 rb->snprintf(buf, sizeof(buf), "Music: %d", musicfiles); 88 rb->snprintf(buf, sizeof(buf), "Music: %d", musicfiles);
96 prn(buf,fontheight); 89 prn(buf,1);
97
98 rb->snprintf(buf, sizeof(buf), "Dirs: %d", dirs); 90 rb->snprintf(buf, sizeof(buf), "Dirs: %d", dirs);
99 prn(buf,fontheight*2); 91 prn(buf,2);
100 rb->lcd_update();
101#ifdef HAVE_REMOTE_LCD
102 rb->lcd_remote_update();
103#endif
104#else 92#else
105 rb->snprintf(buf, sizeof(buf), "Files:%5d", files); 93 rb->snprintf(buf, sizeof(buf), "Files:%5d", files);
106 prn(buf,0); 94 prn(buf,0);
107 rb->snprintf(buf, sizeof(buf), "Dirs: %5d", dirs); 95 rb->snprintf(buf, sizeof(buf), "Dirs: %5d", dirs);
108 prn(buf,1); 96 prn(buf,1);
109#endif 97#endif
98
99 rb->lcd_update();
100#ifdef HAVE_REMOTE_LCD
101 rb->lcd_remote_update();
102#endif
110} 103}
111 104
112void traversedir(char* location, char* name) 105void traversedir(char* location, char* name)
@@ -177,9 +170,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
177 musicfiles = 0; 170 musicfiles = 0;
178 abort = false; 171 abort = false;
179 172
180#ifdef HAVE_LCD_BITMAP
181 rb->lcd_getstringsize("Files: ", &fontwidth, &fontheight);
182#endif
183 rb->splash(HZ, "Counting..."); 173 rb->splash(HZ, "Counting...");
184 update_screen(); 174 update_screen();
185 lasttick = *rb->current_tick; 175 lasttick = *rb->current_tick;
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c
index e0ae300d23..3d60b7e3a3 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -204,9 +204,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
204 update_lap = false; 204 update_lap = false;
205 } 205 }
206 206
207#ifdef HAVE_LCD_BITMAP
208 rb->lcd_update(); 207 rb->lcd_update();
209#endif
210 208
211 if (! counting) 209 if (! counting)
212 { 210 {
diff --git a/apps/plugins/vbrfix.c b/apps/plugins/vbrfix.c
index c87005f7a3..73409eb568 100644
--- a/apps/plugins/vbrfix.c
+++ b/apps/plugins/vbrfix.c
@@ -31,9 +31,7 @@ static void xingupdate(int percent)
31 31
32 rb->snprintf(buf, 32, "%d%%", percent); 32 rb->snprintf(buf, 32, "%d%%", percent);
33 rb->lcd_puts(0, 1, buf); 33 rb->lcd_puts(0, 1, buf);
34#ifdef HAVE_LCD_BITMAP
35 rb->lcd_update(); 34 rb->lcd_update();
36#endif
37} 35}
38 36
39static int insert_data_in_file(char *fname, int fpos, char *buf, int num_bytes) 37static int insert_data_in_file(char *fname, int fpos, char *buf, int num_bytes)
@@ -141,9 +139,7 @@ static bool vbr_fix(char *selected_file)
141 139
142 rb->lcd_clear_display(); 140 rb->lcd_clear_display();
143 rb->lcd_puts_scroll(0, 0, selected_file); 141 rb->lcd_puts_scroll(0, 0, selected_file);
144#ifdef HAVE_LCD_BITMAP
145 rb->lcd_update(); 142 rb->lcd_update();
146#endif
147 143
148 xingupdate(0); 144 xingupdate(0);
149 145
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index 4c5e37e56e..0243d0e7d5 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -932,12 +932,12 @@ static void viewer_draw(int col)
932 932
933 if (prefs.need_scrollbar) 933 if (prefs.need_scrollbar)
934 viewer_scrollbar(); 934 viewer_scrollbar();
935
936 if (col != -1)
937 rb->lcd_update();
938#else 935#else
939 next_screen_to_draw_ptr = next_screen_ptr; 936 next_screen_to_draw_ptr = next_screen_ptr;
940#endif 937#endif
938
939 if (col != -1)
940 rb->lcd_update();
941} 941}
942 942
943static void viewer_top(void) 943static void viewer_top(void)
diff --git a/apps/screens.c b/apps/screens.c
index f06c02a4f1..f821eadc20 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -113,8 +113,6 @@ void usb_screen(void)
113 (LCD_HEIGHT-BMPHEIGHT_usblogo)/2, 113 (LCD_HEIGHT-BMPHEIGHT_usblogo)/2,
114 BMPWIDTH_usblogo, BMPHEIGHT_usblogo); 114 BMPWIDTH_usblogo, BMPHEIGHT_usblogo);
115#endif /* HAVE_LCD_COLOR */ 115#endif /* HAVE_LCD_COLOR */
116
117 lcd_update();
118#else 116#else
119 lcd_double_height(false); 117 lcd_double_height(false);
120 lcd_puts_scroll(0, 0, "[USB Mode]"); 118 lcd_puts_scroll(0, 0, "[USB Mode]");
@@ -122,6 +120,7 @@ void usb_screen(void)
122 status_set_audio(false); 120 status_set_audio(false);
123 status_set_usb(true); 121 status_set_usb(true);
124#endif /* HAVE_LCD_BITMAP */ 122#endif /* HAVE_LCD_BITMAP */
123 lcd_update();
125 124
126 gui_syncstatusbar_draw(&statusbars, true); 125 gui_syncstatusbar_draw(&statusbars, true);
127#ifdef SIMULATOR 126#ifdef SIMULATOR
@@ -315,6 +314,8 @@ static void charging_display_info(bool animate)
315 314
316 for (i = 0; i < 4; i++) 315 for (i = 0; i < 4; i++)
317 lcd_define_pattern(logo_chars[i], buf + 8 * i); 316 lcd_define_pattern(logo_chars[i], buf + 8 * i);
317
318 lcd_update();
318} 319}
319#endif /* (not) HAVE_LCD_BITMAP */ 320#endif /* (not) HAVE_LCD_BITMAP */
320 321