From 3ff8f10fb21199dc9797286c923757b6515d9f3b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 14 Jan 2003 17:57:39 +0000 Subject: reverted kjer's lcd_clear_display() change that stops the scroll we're now more sparse with lcd_update(), it is a slow operation and we should avoid calling it if we don't need to use it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3088 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-recorder.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 80d8a9be57..08f14ea764 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c @@ -216,7 +216,6 @@ void lcd_roll(int lines) void lcd_clear_display (void) { memset (lcd_framebuffer, 0, sizeof lcd_framebuffer); - lcd_stop_scroll(); } void lcd_setmargins(int x, int y) @@ -291,7 +290,7 @@ void lcd_puts(int x, int y, unsigned char *str) lcd_putsxy(xpos, ypos, str); lcd_clearrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); -#if defined(SIMULATOR) +#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS) lcd_update(); #endif } @@ -725,6 +724,7 @@ void lcd_stop_scroll(void) struct scrollinfo* s; int w,h; int index; + int update=0; for ( index = 0; index < SCROLLABLE_LINES; index++ ) { s = &scroll[index]; @@ -739,10 +739,12 @@ void lcd_stop_scroll(void) /* restore scrolled row */ lcd_puts(s->startx, s->starty, s->line); s->mode = SCROLL_MODE_OFF; + update++; } } - lcd_update(); + if(update) + lcd_update(); /* update only if needed */ } void lcd_stop_scroll_line(int line) @@ -750,6 +752,7 @@ void lcd_stop_scroll_line(int line) struct scrollinfo* s; int w,h; int index; + int update=0; for ( index = 0; index < SCROLLABLE_LINES; index++ ) { s = &scroll[index]; @@ -765,10 +768,12 @@ void lcd_stop_scroll_line(int line) /* restore scrolled row */ lcd_puts(s->startx, s->starty, s->line); s->mode = SCROLL_MODE_OFF; + update++; } } - - lcd_update(); + if(update) + /* only updated if need be */ + lcd_update(); } void lcd_scroll_pause(void) -- cgit v1.2.3