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
This commit is contained in:
Jens Arnold 2007-04-06 22:55:00 +00:00
parent a5d7309d96
commit f9b90e9103
36 changed files with 131 additions and 187 deletions

View file

@ -1057,7 +1057,7 @@ bool dbg_ports(void)
lcd_puts(0, line++, buf); lcd_puts(0, line++, buf);
#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES)
snprintf(buf, sizeof(buf), "remotetype:: %d", remote_type()); snprintf(buf, sizeof(buf), "remotetype: %d", remote_type());
lcd_puts(0, line++, buf); lcd_puts(0, line++, buf);
#endif #endif
@ -1248,6 +1248,7 @@ bool dbg_ports(void)
snprintf(buf, 32, "Batt: %d.%02dV", adc_battery_voltage / 100, snprintf(buf, 32, "Batt: %d.%02dV", adc_battery_voltage / 100,
adc_battery_voltage % 100); adc_battery_voltage % 100);
lcd_puts(0, 1, buf); lcd_puts(0, 1, buf);
lcd_update();
button = get_action(CONTEXT_SETTINGS,HZ/5); button = get_action(CONTEXT_SETTINGS,HZ/5);
@ -1350,6 +1351,7 @@ static bool view_battery(void)
while(1) while(1)
{ {
lcd_clear_display();
switch (view) { switch (view) {
case 0: /* voltage history graph */ case 0: /* voltage history graph */
/* Find maximum and minimum voltage for scaling */ /* Find maximum and minimum voltage for scaling */
@ -1371,7 +1373,6 @@ static bool view_battery(void)
if (minv == maxv) if (minv == maxv)
maxv < 65535 ? maxv++ : minv--; maxv < 65535 ? maxv++ : minv--;
lcd_clear_display();
snprintf(buf, 30, "Battery %d.%02d", power_history[0] / 100, snprintf(buf, 30, "Battery %d.%02d", power_history[0] / 100,
power_history[0] % 100); power_history[0] % 100);
lcd_puts(0, 0, buf); lcd_puts(0, 0, buf);
@ -1393,7 +1394,6 @@ static bool view_battery(void)
break; break;
case 1: /* status: */ case 1: /* status: */
lcd_clear_display();
lcd_puts(0, 0, "Power status:"); lcd_puts(0, 0, "Power status:");
battery_read_info(NULL, &y, NULL); battery_read_info(NULL, &y, NULL);
@ -1456,7 +1456,6 @@ static bool view_battery(void)
break; break;
case 2: /* voltage deltas: */ case 2: /* voltage deltas: */
lcd_clear_display();
lcd_puts(0, 0, "Voltage deltas:"); lcd_puts(0, 0, "Voltage deltas:");
for (i = 0; i <= 6; i++) { for (i = 0; i <= 6; i++) {
@ -1469,7 +1468,6 @@ static bool view_battery(void)
break; break;
case 3: /* remaining time estimation: */ case 3: /* remaining time estimation: */
lcd_clear_display();
#if CONFIG_CHARGING == CHARGING_CONTROL #if CONFIG_CHARGING == CHARGING_CONTROL
snprintf(buf, 30, "charge_state: %d", charge_state); snprintf(buf, 30, "charge_state: %d", charge_state);
@ -1657,9 +1655,7 @@ static bool dbg_disk_info(void)
bool timing_info_present = false; bool timing_info_present = false;
char pio3[2], pio4[2]; char pio3[2], pio4[2];
#ifdef HAVE_LCD_BITMAP
lcd_setmargins(0, 0); lcd_setmargins(0, 0);
#endif
while(!done) while(!done)
{ {
@ -1999,9 +1995,7 @@ static bool dbg_fm_radio(void)
char buf[32]; char buf[32];
bool fm_detected; bool fm_detected;
#ifdef HAVE_LCD_BITMAP
lcd_setmargins(0, 0); lcd_setmargins(0, 0);
#endif
while(1) while(1)
{ {

View file

@ -178,9 +178,7 @@ static void splash(struct screen * screen, const char *fmt, va_list ap)
screen->set_drawmode(DRMODE_SOLID); screen->set_drawmode(DRMODE_SOLID);
} }
#endif #endif
#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
screen->update(); screen->update();
#endif
} }
void gui_splash(struct screen * screen, int ticks, void gui_splash(struct screen * screen, int ticks,

View file

@ -191,10 +191,10 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
} }
else else
{ {
#else #else /* CONFIG_CHARGING < CHARGING_MONITOR */
lasttime = current_tick; lasttime = current_tick;
{ {
#endif #endif /* CONFIG_CHARGING < CHARGING_MONITOR */
/* animate in (max.) 4 steps, starting near the current charge level */ /* animate in (max.) 4 steps, starting near the current charge level */
if (TIME_AFTER(current_tick, bar->battery_icon_switch_tick)) if (TIME_AFTER(current_tick, bar->battery_icon_switch_tick))
{ {
@ -205,7 +205,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
} }
} }
else else
#endif #endif /* CONFIG_CHARGING */
{ {
bar->info.batt_charge_step = -1; bar->info.batt_charge_step = -1;
if (battery_level_safe()) if (battery_level_safe())
@ -254,13 +254,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
display->fillrect(0, 0, display->width, STATUSBAR_HEIGHT); display->fillrect(0, 0, display->width, STATUSBAR_HEIGHT);
display->set_drawmode(DRMODE_SOLID); display->set_drawmode(DRMODE_SOLID);
#else
/* players always "redraw" */
{
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_LCD_BITMAP
if (bar->info.battery_state) if (bar->info.battery_state)
gui_statusbar_icon_battery(display, bar->info.battlevel, gui_statusbar_icon_battery(display, bar->info.battlevel,
bar->info.batt_charge_step); bar->info.batt_charge_step);
@ -281,7 +274,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
STATUSBAR_PLUG_X_POS, STATUSBAR_PLUG_X_POS,
STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH, STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH,
STATUSBAR_HEIGHT); STATUSBAR_HEIGHT);
#endif #endif /* CONFIG_CHARGING */
#ifdef HAVE_RECORDING #ifdef HAVE_RECORDING
/* turn off volume display in recording screen */ /* turn off volume display in recording screen */
bool recscreen_on = in_recording_screen(); bool recscreen_on = in_recording_screen();
@ -332,8 +325,8 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
#endif #endif
display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT); display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT);
bar->lastinfo = bar->info; bar->lastinfo = bar->info;
#endif /* HAVE_LCD_BITMAP */
} }
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_LCD_CHARCELLS #ifdef HAVE_LCD_CHARCELLS

View file

@ -33,14 +33,16 @@ void gui_textarea_clear(struct screen * display)
#endif #endif
} }
#ifdef HAVE_LCD_BITMAP
void gui_textarea_update(struct screen * display) void gui_textarea_update(struct screen * display)
{ {
#ifdef HAVE_LCD_BITMAP
int y_start = gui_textarea_get_ystart(display); int y_start = gui_textarea_get_ystart(display);
int y_end = gui_textarea_get_yend(display); int y_end = gui_textarea_get_yend(display);
display->update_rect(0, y_start, display->width, y_end - y_start); display->update_rect(0, y_start, display->width, y_end - y_start);
} #else
display->update();
#endif #endif
}
int gui_textarea_put_message(struct screen * display, int gui_textarea_put_message(struct screen * display,
struct text_message * message, struct text_message * message,
@ -56,8 +58,8 @@ int gui_textarea_put_message(struct screen * display,
void gui_textarea_update_nblines(struct screen * display) void gui_textarea_update_nblines(struct screen * display)
{ {
#ifdef HAVE_LCD_BITMAP
int height=display->height; int height=display->height;
#ifdef HAVE_LCD_BITMAP
if(global_settings.statusbar) if(global_settings.statusbar)
height -= STATUSBAR_HEIGHT; height -= STATUSBAR_HEIGHT;
#ifdef HAS_BUTTONBAR #ifdef HAS_BUTTONBAR
@ -66,11 +68,9 @@ void gui_textarea_update_nblines(struct screen * display)
#endif #endif
display->getstringsize((unsigned char *)"A", &display->char_width, display->getstringsize((unsigned char *)"A", &display->char_width,
&display->char_height); &display->char_height);
display->nb_lines = height / display->char_height;
#else #else
display->char_width = 1; display->char_width = 1;
display->char_height = 1; display->char_height = 1;
/* default on char based player supported by rb */
display->nb_lines = MAX_LINES_ON_SCREEN;
#endif #endif
display->nb_lines = height / display->char_height;
} }

View file

@ -40,16 +40,7 @@ extern void gui_textarea_clear(struct screen * display);
* Updates the area in the screen in which text can be displayed * Updates the area in the screen in which text can be displayed
* - display : the screen structure * - display : the screen structure
*/ */
#ifdef HAVE_LCD_BITMAP
extern void gui_textarea_update(struct screen * display); extern void gui_textarea_update(struct screen * display);
#else
#ifdef SIMULATOR
#define gui_textarea_update(display) \
(display)->update();
#else
#define gui_textarea_update(display)
#endif
#endif
/* /*
* Displays message lines on the given screen * Displays message lines on the given screen

View file

@ -442,8 +442,9 @@ static void init(void)
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
lcd_puts(0, 2, "Insert USB cable"); lcd_puts(0, 2, "Insert USB cable");
lcd_puts(0, 3, "and fix it."); lcd_puts(0, 3, "and fix it.");
lcd_update();
#endif #endif
lcd_update();
while(button_get(true) != SYS_USB_CONNECTED) {}; while(button_get(true) != SYS_USB_CONNECTED) {};
usb_screen(); usb_screen();
system_reboot(); system_reboot();

View file

@ -825,23 +825,29 @@ int show_logo( void )
char version[32]; char version[32];
int font_h, font_w; int font_h, font_w;
snprintf(version, sizeof(version), "Ver. %s", appsversion);
lcd_clear_display(); lcd_clear_display();
lcd_bitmap(rockboxlogo, 0, 10, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo); lcd_bitmap(rockboxlogo, 0, 10, BMPWIDTH_rockboxlogo, BMPHEIGHT_rockboxlogo);
lcd_setfont(FONT_SYSFIXED);
lcd_getstringsize((unsigned char *)"A", &font_w, &font_h);
lcd_putsxy((LCD_WIDTH/2) - ((strlen(version)*font_w)/2),
LCD_HEIGHT-font_h, (unsigned char *)version);
#else
char *rockbox = " ROCKbox!";
lcd_clear_display();
lcd_double_height(true);
lcd_puts(0, 0, rockbox);
lcd_puts_scroll(0, 1, appsversion);
#endif
lcd_update();
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
lcd_remote_clear_display(); lcd_remote_clear_display();
lcd_remote_bitmap(remote_rockboxlogo, 0, 10, BMPWIDTH_remote_rockboxlogo, lcd_remote_bitmap(remote_rockboxlogo, 0, 10, BMPWIDTH_remote_rockboxlogo,
BMPHEIGHT_remote_rockboxlogo); BMPHEIGHT_remote_rockboxlogo);
#endif
snprintf(version, sizeof(version), "Ver. %s", appsversion);
lcd_setfont(FONT_SYSFIXED);
lcd_getstringsize((unsigned char *)"A", &font_w, &font_h);
lcd_putsxy((LCD_WIDTH/2) - ((strlen(version)*font_w)/2),
LCD_HEIGHT-font_h, (unsigned char *)version);
lcd_update();
#ifdef HAVE_REMOTE_LCD
lcd_remote_setfont(FONT_SYSFIXED); lcd_remote_setfont(FONT_SYSFIXED);
lcd_remote_getstringsize((unsigned char *)"A", &font_w, &font_h); lcd_remote_getstringsize((unsigned char *)"A", &font_w, &font_h);
lcd_remote_putsxy((LCD_REMOTE_WIDTH/2) - ((strlen(version)*font_w)/2), lcd_remote_putsxy((LCD_REMOTE_WIDTH/2) - ((strlen(version)*font_w)/2),
@ -849,14 +855,6 @@ int show_logo( void )
lcd_remote_update(); lcd_remote_update();
#endif #endif
#else
char *rockbox = " ROCKbox!";
lcd_clear_display();
lcd_double_height(true);
lcd_puts(0, 0, rockbox);
lcd_puts_scroll(0, 1, appsversion);
#endif
return 0; return 0;
} }

View file

@ -504,9 +504,7 @@ int plugin_load(const char* plugin, void* parameter)
int fd; int fd;
ssize_t readsize; ssize_t readsize;
#endif #endif
#ifdef HAVE_LCD_BITMAP
int xm, ym; int xm, ym;
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
int rxm, rym; int rxm, rym;
#endif #endif
@ -589,20 +587,15 @@ int plugin_load(const char* plugin, void* parameter)
plugin_loaded = true; plugin_loaded = true;
#ifdef HAVE_LCD_BITMAP
xm = lcd_getxmargin(); xm = lcd_getxmargin();
ym = lcd_getymargin(); ym = lcd_getymargin();
lcd_setmargins(0,0); lcd_setmargins(0,0);
#if LCD_DEPTH > 1 #if defined HAVE_LCD_BITMAP && LCD_DEPTH > 1
old_backdrop = lcd_get_backdrop(); old_backdrop = lcd_get_backdrop();
#endif #endif
lcd_clear_display(); lcd_clear_display();
lcd_update(); lcd_update();
#else /* !HAVE_LCD_BITMAP */
lcd_clear_display();
#endif
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
rxm = lcd_remote_getxmargin(); rxm = lcd_remote_getxmargin();
@ -632,11 +625,12 @@ int plugin_load(const char* plugin, void* parameter)
#else /* LCD_DEPTH == 1 */ #else /* LCD_DEPTH == 1 */
lcd_set_drawmode(DRMODE_SOLID); lcd_set_drawmode(DRMODE_SOLID);
#endif /* LCD_DEPTH */ #endif /* LCD_DEPTH */
#endif /* HAVE_LCD_BITMAP */
/* restore margins */ /* restore margins */
lcd_setmargins(xm,ym); lcd_setmargins(xm,ym);
lcd_clear_display(); lcd_clear_display();
lcd_update(); lcd_update();
#endif /* HAVE_LCD_BITMAP */
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
#if LCD_REMOTE_DEPTH > 1 #if LCD_REMOTE_DEPTH > 1

View file

@ -647,9 +647,7 @@ void print_scroll(char* string)
rb->snprintf(screen[(pos+screentop) % LINES], sizeof(screen[0]), "%s", string); rb->snprintf(screen[(pos+screentop) % LINES], sizeof(screen[0]), "%s", string);
rb->lcd_puts(0, pos, screen[(pos+screentop) % LINES]); rb->lcd_puts(0, pos, screen[(pos+screentop) % LINES]);
#ifndef HAVE_LCD_CHARCELLS
rb->lcd_update(); rb->lcd_update();
#endif
pos++; pos++;
} }

View file

@ -129,10 +129,11 @@ bool exit_tsr(bool reenter)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running.");
rb->lcd_puts_scroll(0, 1, "Press OFF to cancel the test"); rb->lcd_puts_scroll(0, 1, "Press OFF to cancel the test");
rb->lcd_puts_scroll(0, 2, "Anything else will resume");
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_puts_scroll(0, 2, "Anything else will resume");
#endif #endif
rb->lcd_update();
if (rb->button_get(true) != BATTERY_OFF) if (rb->button_get(true) != BATTERY_OFF)
exit = false; exit = false;
if (exit) if (exit)
@ -369,21 +370,24 @@ int main(void)
int button, fd; int button, fd;
bool on = false; bool on = false;
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
int i;
const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG, const char *msgs[] = { "Battery Benchmark","Check file", BATTERY_LOG,
"for more info", "PLAY - start", "OFF - quit" }; "for more info", "PLAY - start", "OFF - quit" };
#endif #endif
rb->lcd_clear_display(); rb->lcd_clear_display();
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
int i;
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_setfont(FONT_SYSFIXED); rb->lcd_setfont(FONT_SYSFIXED);
for(i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++) for(i = 0; i<(int)(sizeof(msgs)/sizeof(char *)); i++)
put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1); put_centered_str(msgs[i],rb->lcd_putsxy,LCD_WIDTH,i+1);
#else
rb->lcd_puts_scroll(0, 0, "Batt.Bench.");
rb->lcd_puts_scroll(0, 1, "PLAY/STOP");
#endif
rb->lcd_update(); rb->lcd_update();
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
rb->lcd_remote_clear_display(); rb->lcd_remote_clear_display();
put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0); put_centered_str(msgs[0],rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,0);
@ -394,11 +398,6 @@ int main(void)
rb->lcd_remote_update(); rb->lcd_remote_update();
#endif #endif
#else
rb->lcd_puts_scroll(0, 0, "Batt.Bench.");
rb->lcd_puts_scroll(0, 1, "PLAY/STOP");
#endif
do do
{ {
button = rb->button_get(true); button = rb->button_get(true);

View file

@ -369,9 +369,8 @@ static int run_timer(int nr)
(unsigned char *)show_time((max_ticks-ticks+HZ-1)/HZ)); (unsigned char *)show_time((max_ticks-ticks+HZ-1)/HZ));
} }
} }
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
button = rb->button_get(false); button = rb->button_get(false);
switch (button) { switch (button) {
/* OFF/ON key to exit */ /* OFF/ON key to exit */
@ -493,9 +492,8 @@ static int chessclock_set_int(char* string,
else else
rb->snprintf(str, sizeof str,"%d", *variable); rb->snprintf(str, sizeof str,"%d", *variable);
rb->lcd_puts(0, FIRST_LINE+1, (unsigned char *)str); rb->lcd_puts(0, FIRST_LINE+1, (unsigned char *)str);
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
button = rb->button_get(true); button = rb->button_get(true);
switch(button) { switch(button) {
case CHC_SETTINGS_INC: case CHC_SETTINGS_INC:
@ -562,9 +560,8 @@ static int simple_menu(int nr, unsigned char **strarr)
if (show<0) if (show<0)
show=nr-1; show=nr-1;
rb->lcd_puts_scroll(0, FIRST_LINE, strarr[show]); rb->lcd_puts_scroll(0, FIRST_LINE, strarr[show]);
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
button = rb->button_get(true); button = rb->button_get(true);
switch(button) { switch(button) {
case CHC_SETTINGS_INC: case CHC_SETTINGS_INC:

View file

@ -90,7 +90,6 @@ void roll_credits(void)
else else
rb->lcd_puts(x, line, credits[name]); rb->lcd_puts(x, line, credits[name]);
if (++name >= numnames) if (++name >= numnames)
break; break;
@ -104,6 +103,8 @@ void roll_credits(void)
x += MAX(len/2 + 2, len - new_len/2 + 1); x += MAX(len/2 + 2, len - new_len/2 + 1);
len = new_len; len = new_len;
} }
rb->lcd_update();
/* abort on keypress */ /* abort on keypress */
if (rb->button_get_w_tmo(HZ/8) & BUTTON_REL) if (rb->button_get_w_tmo(HZ/8) & BUTTON_REL)
return; return;

View file

@ -214,9 +214,7 @@ static void print_dice(const int dice[], const int total) {
rb->lcd_puts(0,START_DICE_ROW+(++row)," "); rb->lcd_puts(0,START_DICE_ROW+(++row)," ");
} }
#endif #endif
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
} }
static bool dice_menu(int *num_dice, int *side_index) { static bool dice_menu(int *num_dice, int *side_index) {
int selection; int selection;

View file

@ -301,10 +301,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
break; break;
} }
} }
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
/* wait for keypress */ /* wait for keypress */
while(rb->button_get(true) != LP_QUIT) while(rb->button_get(true) != LP_QUIT)

View file

@ -87,8 +87,8 @@ void tidy_lcd_status(const char *name, int *removed)
rb->snprintf(text, 24, "Cleaned up %d items", *removed); rb->snprintf(text, 24, "Cleaned up %d items", *removed);
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
rb->lcd_puts(0, 2, text); rb->lcd_puts(0, 2, text);
rb->lcd_update();
#endif #endif
rb->lcd_update();
} }
void tidy_get_absolute_path(struct dirent *entry, char *fullname, void tidy_get_absolute_path(struct dirent *entry, char *fullname,

View file

@ -290,14 +290,15 @@ static void display(longlong_t euro, longlong_t home, bool pos)
} }
else else
rb->lcd_puts_scroll(1,1,str); rb->lcd_puts_scroll(1,1,str);
rb->lcd_update();
} }
/* Show country Abbreviation */ /* Show country Abbreviation */
static void show_abbrev(void) static void show_abbrev(void)
{ {
rb->lcd_puts(2,1,abbrev_str[country]); rb->splash(HZ*3/4,abbrev_str[country]);
rb->sleep(HZ*3/4);
} }
@ -325,6 +326,7 @@ static void currency_menu(void)
{ {
rb->lcd_puts(0,0,"Currency:"); rb->lcd_puts(0,0,"Currency:");
rb->lcd_puts(0,1,currency_str[c]); rb->lcd_puts(0,1,currency_str[c]);
rb->lcd_update();
switch (rb->button_get(true)) switch (rb->button_get(true))
{ {
case BUTTON_RIGHT|BUTTON_REL: case BUTTON_RIGHT|BUTTON_REL:
@ -361,6 +363,7 @@ static int euro_menu(void)
rb->lcd_puts(0,0," Currency"); rb->lcd_puts(0,0," Currency");
rb->lcd_puts(0,1," Exit"); rb->lcd_puts(0,1," Exit");
rb->lcd_putc(0,c,0xe110); rb->lcd_putc(0,c,0xe110);
rb->lcd_update();
switch (rb->button_get(true)) switch (rb->button_get(true))
{ {
@ -394,6 +397,7 @@ static void euro_exit(void *parameter)
//Clear the screen //Clear the screen
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_update();
} }

View file

@ -848,6 +848,7 @@ void ShowFlashInfo(tFlashInfo* pInfo)
{ {
rb->lcd_puts_scroll(0, 0, "Flash: M=? D=?"); rb->lcd_puts_scroll(0, 0, "Flash: M=? D=?");
rb->lcd_puts_scroll(0, 1, "Impossible to program"); rb->lcd_puts_scroll(0, 1, "Impossible to program");
rb->lcd_update();
WaitForButton(); WaitForButton();
} }
else else
@ -860,10 +861,12 @@ void ShowFlashInfo(tFlashInfo* pInfo)
{ {
rb->snprintf(buf, sizeof(buf), "Size: %d KB", pInfo->size / 1024); rb->snprintf(buf, sizeof(buf), "Size: %d KB", pInfo->size / 1024);
rb->lcd_puts_scroll(0, 1, buf); rb->lcd_puts_scroll(0, 1, buf);
rb->lcd_update();
} }
else else
{ {
rb->lcd_puts_scroll(0, 1, "Unsupported chip"); rb->lcd_puts_scroll(0, 1, "Unsupported chip");
rb->lcd_update();
WaitForButton(); WaitForButton();
} }
} }
@ -941,7 +944,8 @@ void DoUserDialog(char* filename)
rb->lcd_puts_scroll(0, 0, filename); rb->lcd_puts_scroll(0, 0, filename);
rb->lcd_puts_scroll(0, 1, "[Menu] to check"); rb->lcd_puts_scroll(0, 1, "[Menu] to check");
rb->lcd_update();
button = WaitForButton(); button = WaitForButton();
if (button != BUTTON_MENU) if (button != BUTTON_MENU)
{ {
@ -950,7 +954,8 @@ void DoUserDialog(char* filename)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts(0, 0, "Checking..."); rb->lcd_puts(0, 0, "Checking...");
rb->lcd_update();
rc = CheckFirmwareFile(filename, FlashInfo.size, is_romless); rc = CheckFirmwareFile(filename, FlashInfo.size, is_romless);
rb->lcd_puts(0, 0, "Checked:"); rb->lcd_puts(0, 0, "Checked:");
switch (rc) switch (rc)
@ -989,6 +994,7 @@ void DoUserDialog(char* filename)
rb->lcd_puts_scroll(0, 0, "Check failed."); rb->lcd_puts_scroll(0, 0, "Check failed.");
break; break;
} }
rb->lcd_update();
rb->sleep(HZ*3); rb->sleep(HZ*3);
@ -996,6 +1002,7 @@ void DoUserDialog(char* filename)
{ {
rb->lcd_puts_scroll(0, 0, "[On] to program,"); rb->lcd_puts_scroll(0, 0, "[On] to program,");
rb->lcd_puts_scroll(0, 1, "other key to exit."); rb->lcd_puts_scroll(0, 1, "other key to exit.");
rb->lcd_update();
} }
else else
{ /* error occured */ { /* error occured */
@ -1012,7 +1019,8 @@ void DoUserDialog(char* filename)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Are you sure?"); rb->lcd_puts_scroll(0, 0, "Are you sure?");
rb->lcd_puts_scroll(0, 1, "[+] to proceed."); rb->lcd_puts_scroll(0, 1, "[+] to proceed.");
rb->lcd_update();
button = WaitForButton(); button = WaitForButton();
if (button != BUTTON_RIGHT) if (button != BUTTON_RIGHT)
@ -1022,7 +1030,8 @@ void DoUserDialog(char* filename)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Programming..."); rb->lcd_puts_scroll(0, 0, "Programming...");
rb->lcd_update();
rc = ProgramFirmwareFile(filename, FlashInfo.size); rc = ProgramFirmwareFile(filename, FlashInfo.size);
if (rc) if (rc)
@ -1031,12 +1040,14 @@ void DoUserDialog(char* filename)
rb->lcd_puts_scroll(0, 0, "Programming failed!"); rb->lcd_puts_scroll(0, 0, "Programming failed!");
rb->snprintf(buf, sizeof(buf), "%d errors", rc); rb->snprintf(buf, sizeof(buf), "%d errors", rc);
rb->lcd_puts_scroll(0, 1, buf); rb->lcd_puts_scroll(0, 1, buf);
rb->lcd_update();
WaitForButton(); WaitForButton();
} }
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Verifying..."); rb->lcd_puts_scroll(0, 0, "Verifying...");
rb->lcd_update();
rc = VerifyFirmwareFile(filename); rc = VerifyFirmwareFile(filename);
rb->lcd_clear_display(); rb->lcd_clear_display();
@ -1052,6 +1063,7 @@ void DoUserDialog(char* filename)
} }
rb->lcd_puts_scroll(0, 1, "Press any key to exit."); rb->lcd_puts_scroll(0, 1, "Press any key to exit.");
rb->lcd_update();
WaitForButton(); WaitForButton();
} }

View file

@ -323,9 +323,7 @@ static void move_cursor(int x, int y)
+ ( ( y + 4 + cursor_pos/5 )%4 )*5; + ( ( y + 4 + cursor_pos/5 )%4 )*5;
draw_cursor(); draw_cursor();
} }
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
} }
/* initialize the board */ /* initialize the board */
@ -339,9 +337,8 @@ static void flipit_init(void)
toggle[i]=1; toggle[i]=1;
draw_spot(i); draw_spot(i);
} }
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
for (i=0; i<20; i++) { for (i=0; i<20; i++) {
cursor_pos = (rb->rand() % 20); cursor_pos = (rb->rand() % 20);
flipit_toggle(); flipit_toggle();
@ -351,9 +348,7 @@ static void flipit_init(void)
draw_cursor(); draw_cursor();
moves = 0; moves = 0;
draw_info_panel(); draw_info_panel();
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
} }
/* the main game loop */ /* the main game loop */
@ -392,9 +387,7 @@ static bool flipit_loop(void)
cursor_pos = i; cursor_pos = i;
flipit_toggle(); flipit_toggle();
draw_cursor(); draw_cursor();
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
rb->sleep(HZ*2/3); rb->sleep(HZ*2/3);
} }
} }
@ -412,9 +405,7 @@ static bool flipit_loop(void)
cursor_pos = i; cursor_pos = i;
flipit_toggle(); flipit_toggle();
draw_cursor(); draw_cursor();
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
break; break;
} }
} }
@ -429,9 +420,7 @@ static bool flipit_loop(void)
if (!flipit_finished()) { if (!flipit_finished()) {
flipit_toggle(); flipit_toggle();
draw_cursor(); draw_cursor();
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
} }
break; break;
@ -546,9 +535,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
spots[i]=1; spots[i]=1;
draw_spot(i); draw_spot(i);
} }
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
rb->sleep(HZ*3/2); rb->sleep(HZ*3/2);
rb->srand(*rb->current_tick); rb->srand(*rb->current_tick);

View file

@ -78,6 +78,7 @@ static void jackpot_exit(void *parameter)
/* Clear the screen */ /* Clear the screen */
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_update();
} }
@ -115,13 +116,15 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->lcd_putc(9,0,h2); rb->lcd_putc(10,0,h1); rb->lcd_putc(9,0,h2); rb->lcd_putc(10,0,h1);
rb->lcd_puts(0,1," V1.1 "); rb->lcd_puts(0,1," V1.1 ");
rb->lcd_putc(1,1,h3); rb->lcd_putc(9,1,h3); rb->lcd_putc(1,1,h3); rb->lcd_putc(9,1,h3);
rb->lcd_update();
rb->sleep(HZ*2); rb->sleep(HZ*2);
rb->lcd_clear_display();
/*First display*/ /*First display*/
rb->lcd_clear_display();
rb->snprintf(str,sizeof(str),"[ ]$%d",g); rb->snprintf(str,sizeof(str),"[ ]$%d",g);
rb->lcd_puts(0,0,str); rb->lcd_puts(0,0,str);
rb->lcd_puts_scroll(0,1,"PLAY to begin"); rb->lcd_puts_scroll(0,1,"PLAY to begin");
rb->lcd_update();
/*Empty the event queue*/ /*Empty the event queue*/
rb->button_clear_queue(); rb->button_clear_queue();
@ -165,6 +168,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
/*Clear the Second line*/ /*Clear the Second line*/
rb->lcd_puts_scroll(0,1,"Good luck"); rb->lcd_puts_scroll(0,1,"Good luck");
rb->lcd_update();
/*GO !!!!*/ /*GO !!!!*/
if ( go && !exit ) if ( go && !exit )
@ -188,6 +192,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->lcd_putc(1,0, h1); rb->lcd_putc(1,0, h1);
rb->lcd_putc(2,0, h2); rb->lcd_putc(2,0, h2);
rb->lcd_putc(3,0, h3); rb->lcd_putc(3,0, h3);
rb->lcd_update();
for(i=0;i<3;i++) for(i=0;i<3;i++)
{ {
if (n[i]>=0) if (n[i]>=0)
@ -268,6 +273,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->snprintf(str,sizeof(str),"You win %d$",j); rb->snprintf(str,sizeof(str),"You win %d$",j);
rb->lcd_puts(0,1,str); rb->lcd_puts(0,1,str);
} }
rb->lcd_update();
} }
} }

View file

@ -99,6 +99,8 @@ void pgfx_update(void)
for (i = 0; i < char_width * char_height; i++) for (i = 0; i < char_width * char_height; i++)
pgfx_rb->lcd_define_pattern(gfx_chars[i], gfx_buffer + 7 * i); pgfx_rb->lcd_define_pattern(gfx_chars[i], gfx_buffer + 7 * i);
pgfx_rb->lcd_update();
} }
/*** Parameter handling ***/ /*** Parameter handling ***/

View file

@ -312,12 +312,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
#else #else
if (cpos != old_cpos) { if (cpos != old_cpos) {
rb->lcd_clear_display(); rb->lcd_clear_display();
pgfx_update();
pgfx_display(cpos, 0); pgfx_display(cpos, 0);
old_cpos = cpos; old_cpos = cpos;
} }
else pgfx_update();
pgfx_update();
#endif #endif
rb->sleep(HZ/timer); rb->sleep(HZ/timer);

View file

@ -778,8 +778,8 @@ void draw_display(void)
rb->lcd_puts(0,2,METRONOME_MSG_START); rb->lcd_puts(0,2,METRONOME_MSG_START);
else else
rb->lcd_puts(0,2,METRONOME_MSG_STOP); rb->lcd_puts(0,2,METRONOME_MSG_STOP);
rb->lcd_update();
#endif #endif
rb->lcd_update();
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
rb->lcd_remote_drawline(0, 12, 111, 12); rb->lcd_remote_drawline(0, 12, 111, 12);
if(sound_paused) if(sound_paused)

View file

@ -66,6 +66,7 @@ static struct plugin_api* rb;
static void impossible(void) static void impossible(void)
{ {
rb->lcd_puts(0,1,"Impossible!"); rb->lcd_puts(0,1,"Impossible!");
rb->lcd_update();
rb->sleep(HZ); rb->sleep(HZ);
return; return;
} }
@ -76,6 +77,7 @@ static void lose(void)
rb->lcd_define_pattern(hsmile,smile); rb->lcd_define_pattern(hsmile,smile);
rb->lcd_puts(0,1,"You Win!!"); rb->lcd_puts(0,1,"You Win!!");
rb->lcd_putc(8,1,hsmile); rb->lcd_putc(8,1,hsmile);
rb->lcd_update();
end=true; end=true;
rb->sleep(HZ*2); rb->sleep(HZ*2);
return; return;
@ -88,6 +90,7 @@ static void win(void)
rb->lcd_define_pattern(hcry,cry); rb->lcd_define_pattern(hcry,cry);
rb->lcd_puts(0,1,"You Lose!!"); rb->lcd_puts(0,1,"You Lose!!");
rb->lcd_putc(9,1,hcry); rb->lcd_putc(9,1,hcry);
rb->lcd_update();
end=true; end=true;
rb->sleep(HZ*2); rb->sleep(HZ*2);
return; return;
@ -103,7 +106,7 @@ static void display_first_line(int x)
rb->lcd_puts(0,0,str); rb->lcd_puts(0,0,str);
rb->lcd_define_pattern(h1,pattern3); rb->lcd_define_pattern(h1,pattern3);
for (i=0;i<x/3;i++) for (i=0;i<x/3;i++)
rb->lcd_putc(i,0,h1); rb->lcd_putc(i,0,h1);
if (x%3==2) if (x%3==2)
@ -131,6 +134,7 @@ static void nim_exit(void *parameter)
/*Clear the screen*/ /*Clear the screen*/
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_update();
} }
/* this is the plugin entry point */ /* this is the plugin entry point */
@ -183,6 +187,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y); rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y);
rb->lcd_puts(0,1,str); rb->lcd_puts(0,1,str);
rb->lcd_update();
go=false; go=false;
while (!go) while (!go)
@ -221,6 +226,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
display_first_line(x); display_first_line(x);
rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y); rb->snprintf(str,sizeof(str),"[%d..%d]?=%d",min,v,y);
rb->lcd_puts(0,1,str); rb->lcd_puts(0,1,str);
rb->lcd_update();
} }
if ( (y==0) && (x<21)) if ( (y==0) && (x<21))
@ -281,6 +287,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
x-=y; x-=y;
rb->snprintf(str,sizeof(str),"I take=%d",y); rb->snprintf(str,sizeof(str),"I take=%d",y);
rb->lcd_puts(0,1,str); rb->lcd_puts(0,1,str);
rb->lcd_update();
rb->sleep(HZ); rb->sleep(HZ);
} }
if ((x==1)&&(!end)) if ((x==1)&&(!end))

View file

@ -173,9 +173,8 @@ static bool _dir_properties(DPS* dps)
rb->snprintf(dps->tstr, 64, "Size: %s", rb->snprintf(dps->tstr, 64, "Size: %s",
filesize2string(dps->bc, dps->tstr2, 64)); filesize2string(dps->bc, dps->tstr2, 64));
rb->lcd_puts(0,5,dps->tstr); rb->lcd_puts(0,5,dps->tstr);
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
/* recursion */ /* recursion */
result = _dir_properties(dps); result = _dir_properties(dps);
} }
@ -302,9 +301,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts(0,0,"File/Dir not found:"); rb->lcd_puts(0,0,"File/Dir not found:");
rb->lcd_puts(0,1,(char*)file); rb->lcd_puts(0,1,(char*)file);
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
rb->action_userabort(TIMEOUT_BLOCK); rb->action_userabort(TIMEOUT_BLOCK);
return PLUGIN_OK; return PLUGIN_OK;
} }

View file

@ -59,22 +59,16 @@ struct file_format *list = NULL;
void update_screen(bool clear) void update_screen(bool clear)
{ {
char buf[15]; char buf[15];
#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */
int i; int i;
rb->snprintf(buf,sizeof(buf),"Folders: %d",dirs_count);
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
rb->snprintf(buf,15,"Folders: %d",dirs_count);
if(clear) if(clear)
rb->screens[i]->clear_display(); rb->screens[i]->clear_display();
rb->screens[i]->putsxy(0,0,buf); rb->screens[i]->putsxy(0,0,buf);
rb->screens[i]->update(); rb->screens[i]->update();
} }
#else
rb->snprintf(buf,15,"Folders: %d",dirs_count);
if(clear)
rb->lcd_clear_display();
rb->lcd_puts(0,0,buf);
#endif
} }
void traversedir(char* location, char* name) void traversedir(char* location, char* name)

View file

@ -893,6 +893,7 @@ void DoUserDialog(char* filename)
{ {
rb->lcd_puts_scroll(0, 0, "Hint: You're not using the latest bootloader. A full reflash is recommended, but not required."); rb->lcd_puts_scroll(0, 0, "Hint: You're not using the latest bootloader. A full reflash is recommended, but not required.");
rb->lcd_puts_scroll(0, 1, "Press [Menu] to ignore"); rb->lcd_puts_scroll(0, 1, "Press [Menu] to ignore");
rb->lcd_update();
if (WaitForButton() != BUTTON_MENU) if (WaitForButton() != BUTTON_MENU)
{ {
@ -902,6 +903,7 @@ void DoUserDialog(char* filename)
} }
rb->lcd_puts(0, 0, "Checking..."); rb->lcd_puts(0, 0, "Checking...");
rb->lcd_update();
space = FlashInfo.size - (pos-FB + sizeof(ImageHeader)); space = FlashInfo.size - (pos-FB + sizeof(ImageHeader));
/* size minus start */ /* size minus start */
@ -941,6 +943,7 @@ void DoUserDialog(char* filename)
rb->lcd_puts_scroll(0, 1, "Check failed."); rb->lcd_puts_scroll(0, 1, "Check failed.");
break; break;
} }
rb->lcd_update();
if (rc == eOK) if (rc == eOK)
{ /* was OK */ { /* was OK */
@ -955,6 +958,7 @@ void DoUserDialog(char* filename)
rb->lcd_puts_scroll(0, 0, "Flash failed."); rb->lcd_puts_scroll(0, 0, "Flash failed.");
rb->lcd_puts_scroll(0, 1, "Any key to exit."); rb->lcd_puts_scroll(0, 1, "Any key to exit.");
} }
rb->lcd_update();
button = WaitForButton(); button = WaitForButton();
if (rc != eOK || button != BUTTON_ON) if (rc != eOK || button != BUTTON_ON)
@ -972,6 +976,7 @@ void DoUserDialog(char* filename)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Programming..."); rb->lcd_puts_scroll(0, 0, "Programming...");
rb->lcd_update();
rc = ProgramImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size); rc = ProgramImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size);
if (rc) if (rc)
@ -980,11 +985,13 @@ void DoUserDialog(char* filename)
rb->snprintf(buf, sizeof(buf), "%d errors", rc); rb->snprintf(buf, sizeof(buf), "%d errors", rc);
rb->lcd_puts_scroll(0, 0, "Programming failed!"); rb->lcd_puts_scroll(0, 0, "Programming failed!");
rb->lcd_puts_scroll(0, 1, buf); rb->lcd_puts_scroll(0, 1, buf);
rb->lcd_update();
button = WaitForButton(); button = WaitForButton();
} }
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, "Verifying..."); rb->lcd_puts_scroll(0, 0, "Verifying...");
rb->lcd_update();
rc = VerifyImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size); rc = VerifyImageFile(filename, pos, &ImageHeader, UCL_HEADER, true_size);
@ -992,12 +999,14 @@ void DoUserDialog(char* filename)
if (rc == 0) if (rc == 0)
{ {
rb->lcd_puts(0, 0, "Verify OK."); rb->lcd_puts(0, 0, "Verify OK.");
rb->lcd_update();
} }
else else
{ {
rb->snprintf(buf, sizeof(buf), "Verify fail! %d errors", rc); rb->snprintf(buf, sizeof(buf), "Verify fail! %d errors", rc);
rb->lcd_puts_scroll(0, 0, buf); rb->lcd_puts_scroll(0, 0, buf);
rb->lcd_puts_scroll(0, 1, "Use safe image if booting hangs: [-] during power-on"); rb->lcd_puts_scroll(0, 1, "Use safe image if booting hangs: [-] during power-on");
rb->lcd_update();
button = WaitForButton(); button = WaitForButton();
} }
} }

View file

@ -34,7 +34,8 @@ rb->lcd_update()
#define PUTS(str) do { \ #define PUTS(str) do { \
rb->lcd_puts(0, y, str); \ rb->lcd_puts(0, y, str); \
y = (y + 1) % 2; \ y = (y + 1) % 2; \
} while (0); } while (0); \
rb->lcd_update()
#endif #endif
extern struct plugin_api* rb; extern struct plugin_api* rb;

View file

@ -24,9 +24,6 @@ static struct plugin_api* rb;
static int files, dirs, musicfiles; static int files, dirs, musicfiles;
static int lasttick; static int lasttick;
static bool abort; static bool abort;
#ifdef HAVE_LCD_BITMAP
static int fontwidth, fontheight;
#endif
#if CONFIG_KEYPAD == PLAYER_PAD #if CONFIG_KEYPAD == PLAYER_PAD
#define STATS_STOP BUTTON_STOP #define STATS_STOP BUTTON_STOP
@ -70,43 +67,39 @@ const char *music_exts[] = {"mp3","mp2","mp1","mpa","ogg",
void prn(const char *str, int y) void prn(const char *str, int y)
{ {
#ifdef HAVE_LCD_BITMAP rb->lcd_puts(0,y,str);
rb->lcd_putsxy(0,y,str);
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
rb->lcd_remote_putsxy(0,y,str); rb->lcd_remote_puts(0,y,str);
#endif
#else
rb->lcd_puts(0,y,str);
#endif #endif
} }
void update_screen(void) void update_screen(void)
{ {
char buf[15]; char buf[15];
#ifdef HAVE_LCD_BITMAP
rb->lcd_clear_display(); rb->lcd_clear_display();
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
rb->lcd_remote_clear_display(); rb->lcd_remote_clear_display();
#endif #endif
#ifdef HAVE_LCD_BITMAP
rb->snprintf(buf, sizeof(buf), "Files: %d", files); rb->snprintf(buf, sizeof(buf), "Files: %d", files);
prn(buf,0); prn(buf,0);
rb->snprintf(buf, sizeof(buf), "Music: %d", musicfiles); rb->snprintf(buf, sizeof(buf), "Music: %d", musicfiles);
prn(buf,fontheight); prn(buf,1);
rb->snprintf(buf, sizeof(buf), "Dirs: %d", dirs); rb->snprintf(buf, sizeof(buf), "Dirs: %d", dirs);
prn(buf,fontheight*2); prn(buf,2);
rb->lcd_update();
#ifdef HAVE_REMOTE_LCD
rb->lcd_remote_update();
#endif
#else #else
rb->snprintf(buf, sizeof(buf), "Files:%5d", files); rb->snprintf(buf, sizeof(buf), "Files:%5d", files);
prn(buf,0); prn(buf,0);
rb->snprintf(buf, sizeof(buf), "Dirs: %5d", dirs); rb->snprintf(buf, sizeof(buf), "Dirs: %5d", dirs);
prn(buf,1); prn(buf,1);
#endif #endif
rb->lcd_update();
#ifdef HAVE_REMOTE_LCD
rb->lcd_remote_update();
#endif
} }
void traversedir(char* location, char* name) void traversedir(char* location, char* name)
@ -177,9 +170,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
musicfiles = 0; musicfiles = 0;
abort = false; abort = false;
#ifdef HAVE_LCD_BITMAP
rb->lcd_getstringsize("Files: ", &fontwidth, &fontheight);
#endif
rb->splash(HZ, "Counting..."); rb->splash(HZ, "Counting...");
update_screen(); update_screen();
lasttick = *rb->current_tick; lasttick = *rb->current_tick;

View file

@ -204,9 +204,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
update_lap = false; update_lap = false;
} }
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
if (! counting) if (! counting)
{ {

View file

@ -31,9 +31,7 @@ static void xingupdate(int percent)
rb->snprintf(buf, 32, "%d%%", percent); rb->snprintf(buf, 32, "%d%%", percent);
rb->lcd_puts(0, 1, buf); rb->lcd_puts(0, 1, buf);
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
} }
static int insert_data_in_file(char *fname, int fpos, char *buf, int num_bytes) static 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)
rb->lcd_clear_display(); rb->lcd_clear_display();
rb->lcd_puts_scroll(0, 0, selected_file); rb->lcd_puts_scroll(0, 0, selected_file);
#ifdef HAVE_LCD_BITMAP
rb->lcd_update(); rb->lcd_update();
#endif
xingupdate(0); xingupdate(0);

View file

@ -932,12 +932,12 @@ static void viewer_draw(int col)
if (prefs.need_scrollbar) if (prefs.need_scrollbar)
viewer_scrollbar(); viewer_scrollbar();
if (col != -1)
rb->lcd_update();
#else #else
next_screen_to_draw_ptr = next_screen_ptr; next_screen_to_draw_ptr = next_screen_ptr;
#endif #endif
if (col != -1)
rb->lcd_update();
} }
static void viewer_top(void) static void viewer_top(void)

View file

@ -113,8 +113,6 @@ void usb_screen(void)
(LCD_HEIGHT-BMPHEIGHT_usblogo)/2, (LCD_HEIGHT-BMPHEIGHT_usblogo)/2,
BMPWIDTH_usblogo, BMPHEIGHT_usblogo); BMPWIDTH_usblogo, BMPHEIGHT_usblogo);
#endif /* HAVE_LCD_COLOR */ #endif /* HAVE_LCD_COLOR */
lcd_update();
#else #else
lcd_double_height(false); lcd_double_height(false);
lcd_puts_scroll(0, 0, "[USB Mode]"); lcd_puts_scroll(0, 0, "[USB Mode]");
@ -122,6 +120,7 @@ void usb_screen(void)
status_set_audio(false); status_set_audio(false);
status_set_usb(true); status_set_usb(true);
#endif /* HAVE_LCD_BITMAP */ #endif /* HAVE_LCD_BITMAP */
lcd_update();
gui_syncstatusbar_draw(&statusbars, true); gui_syncstatusbar_draw(&statusbars, true);
#ifdef SIMULATOR #ifdef SIMULATOR
@ -315,6 +314,8 @@ static void charging_display_info(bool animate)
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
lcd_define_pattern(logo_chars[i], buf + 8 * i); lcd_define_pattern(logo_chars[i], buf + 8 * i);
lcd_update();
} }
#endif /* (not) HAVE_LCD_BITMAP */ #endif /* (not) HAVE_LCD_BITMAP */

View file

@ -295,10 +295,7 @@ void lcd_define_pattern(unsigned long ucs, const char *pattern)
memcpy(xfont_variable[glyph & 0x7fff], pattern, HW_PATTERN_SIZE); memcpy(xfont_variable[glyph & 0x7fff], pattern, HW_PATTERN_SIZE);
pat = glyph_to_pat(glyph); pat = glyph_to_pat(glyph);
if (pat != NO_PATTERN) if (pat != NO_PATTERN)
{
memcpy(lcd_patterns[pat].pattern, pattern, HW_PATTERN_SIZE); memcpy(lcd_patterns[pat].pattern, pattern, HW_PATTERN_SIZE);
lcd_update(); //FIXME: remove when lcd_update() calls are checked all over
}
} }
} }
@ -315,8 +312,6 @@ void lcd_clear_display(void)
for (x = 0; x < LCD_WIDTH; x++) for (x = 0; x < LCD_WIDTH; x++)
for (y = 0; y < LCD_HEIGHT; y++) for (y = 0; y < LCD_HEIGHT; y++)
lcd_putxchar(x, y, xspace); lcd_putxchar(x, y, xspace);
lcd_update(); //FIXME: remove when lcd_update() calls are checked all over
} }
/* Put an unicode character at the given position */ /* Put an unicode character at the given position */
@ -326,7 +321,6 @@ void lcd_putc(int x, int y, unsigned long ucs)
return; return;
lcd_putxchar(x, y, find_xchar(ucs)); lcd_putxchar(x, y, find_xchar(ucs));
lcd_update(); //FIXME: remove when lcd_update() calls are checked all over
} }
/* Show cursor (alternating with existing character) at the given position */ /* Show cursor (alternating with existing character) at the given position */
@ -384,7 +378,6 @@ void lcd_putsxy(int x, int y, const unsigned char *str)
return; return;
lcd_putsxyofs(x, y, 0, str); lcd_putsxyofs(x, y, 0, str);
lcd_update(); //FIXME: remove when lcd_update() calls are checked all over
} }
/*** Line oriented text output ***/ /*** Line oriented text output ***/
@ -410,8 +403,6 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
x = lcd_putsxyofs(x, y, offset, str); x = lcd_putsxyofs(x, y, offset, str);
while (x < LCD_WIDTH) while (x < LCD_WIDTH)
lcd_putxchar(x++, y, xspace); lcd_putxchar(x++, y, xspace);
lcd_update(); //FIXME: remove when lcd_update() calls are checked all over
} }
/** scrolling **/ /** scrolling **/

View file

@ -74,11 +74,10 @@ void panicf( const char *fmt, ...)
panic_buf[i+18] = c; panic_buf[i+18] = c;
} }
} }
lcd_update();
#else #else
/* no LCD */ /* no LCD */
#endif #endif
lcd_update();
DEBUGF(panic_buf); DEBUGF(panic_buf);
set_cpu_frequency(0); set_cpu_frequency(0);

View file

@ -452,10 +452,7 @@ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
lcd_puts(0,0,str); lcd_puts(0,0,str);
snprintf(str,sizeof(str),"at %08x",pc); snprintf(str,sizeof(str),"at %08x",pc);
lcd_puts(0,1,str); lcd_puts(0,1,str);
#ifdef HAVE_LCD_BITMAP
lcd_update (); lcd_update ();
#endif
while (1) while (1)
{ {

View file

@ -46,9 +46,8 @@ void usb_screen(void)
{ {
lcd_clear_display(); lcd_clear_display();
lcd_puts(0, 0, "USB mode"); lcd_puts(0, 0, "USB mode");
#ifdef HAVE_LCD_BITMAP
lcd_update(); lcd_update();
#endif
usb_acknowledge(SYS_USB_CONNECTED_ACK); usb_acknowledge(SYS_USB_CONNECTED_ACK);
while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ)) { while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ)) {
} }
@ -59,9 +58,8 @@ int show_logo(void)
lcd_clear_display(); lcd_clear_display();
lcd_puts(0, 0, "Rockbox"); lcd_puts(0, 0, "Rockbox");
lcd_puts(0, 1, "Rescue boot"); lcd_puts(0, 1, "Rescue boot");
#ifdef HAVE_LCD_BITMAP
lcd_update(); lcd_update();
#endif
return 0; return 0;
} }
@ -104,10 +102,7 @@ void charging_screen(void)
battv / 100, battv % 100, battery_level()); battv / 100, battv % 100, battery_level());
lcd_puts(0, 1, buf); lcd_puts(0, 1, buf);
} }
#ifdef HAVE_LCD_BITMAP
lcd_update(); lcd_update();
#endif
button = button_get_w_tmo(HZ/2); button = button_get_w_tmo(HZ/2);
#ifdef BUTTON_ON #ifdef BUTTON_ON
@ -137,8 +132,8 @@ void prompt_usb(const char* msg1, const char* msg2)
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
lcd_puts(0, 2, "Insert USB cable"); lcd_puts(0, 2, "Insert USB cable");
lcd_puts(0, 3, "and fix it."); lcd_puts(0, 3, "and fix it.");
lcd_update();
#endif #endif
lcd_update();
do do
{ {
button = button_get(true); button = button_get(true);