diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2003-01-14 17:57:39 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2003-01-14 17:57:39 +0000 |
| commit | 3ff8f10fb21199dc9797286c923757b6515d9f3b (patch) | |
| tree | cf5d659c0664f53eb7502104816fa2ca8d66f6c1 | |
| parent | 4b6a1f25663c4754d64f215a8284480948c59a85 (diff) | |
| download | rockbox-3ff8f10fb21199dc9797286c923757b6515d9f3b.zip rockbox-3ff8f10fb21199dc9797286c923757b6515d9f3b.tar.gz rockbox-3ff8f10fb21199dc9797286c923757b6515d9f3b.tar.bz2 rockbox-3ff8f10fb21199dc9797286c923757b6515d9f3b.tar.xz | |
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
| -rw-r--r-- | firmware/drivers/lcd-recorder.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 80d8a9b..08f14ea 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) |