summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-01-14 17:57:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-01-14 17:57:39 +0000
commit3ff8f10fb21199dc9797286c923757b6515d9f3b (patch)
treecf5d659c0664f53eb7502104816fa2ca8d66f6c1
parent4b6a1f25663c4754d64f215a8284480948c59a85 (diff)
downloadrockbox-3ff8f10fb21199dc9797286c923757b6515d9f3b.tar.gz
rockbox-3ff8f10fb21199dc9797286c923757b6515d9f3b.zip
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.c15
1 files 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)
216void lcd_clear_display (void) 216void lcd_clear_display (void)
217{ 217{
218 memset (lcd_framebuffer, 0, sizeof lcd_framebuffer); 218 memset (lcd_framebuffer, 0, sizeof lcd_framebuffer);
219 lcd_stop_scroll();
220} 219}
221 220
222void lcd_setmargins(int x, int y) 221void lcd_setmargins(int x, int y)
@@ -291,7 +290,7 @@ void lcd_puts(int x, int y, unsigned char *str)
291 lcd_putsxy(xpos, ypos, str); 290 lcd_putsxy(xpos, ypos, str);
292 lcd_clearrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); 291 lcd_clearrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
293 292
294#if defined(SIMULATOR) 293#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS)
295 lcd_update(); 294 lcd_update();
296#endif 295#endif
297} 296}
@@ -725,6 +724,7 @@ void lcd_stop_scroll(void)
725 struct scrollinfo* s; 724 struct scrollinfo* s;
726 int w,h; 725 int w,h;
727 int index; 726 int index;
727 int update=0;
728 728
729 for ( index = 0; index < SCROLLABLE_LINES; index++ ) { 729 for ( index = 0; index < SCROLLABLE_LINES; index++ ) {
730 s = &scroll[index]; 730 s = &scroll[index];
@@ -739,10 +739,12 @@ void lcd_stop_scroll(void)
739 /* restore scrolled row */ 739 /* restore scrolled row */
740 lcd_puts(s->startx, s->starty, s->line); 740 lcd_puts(s->startx, s->starty, s->line);
741 s->mode = SCROLL_MODE_OFF; 741 s->mode = SCROLL_MODE_OFF;
742 update++;
742 } 743 }
743 } 744 }
744 745
745 lcd_update(); 746 if(update)
747 lcd_update(); /* update only if needed */
746} 748}
747 749
748void lcd_stop_scroll_line(int line) 750void lcd_stop_scroll_line(int line)
@@ -750,6 +752,7 @@ void lcd_stop_scroll_line(int line)
750 struct scrollinfo* s; 752 struct scrollinfo* s;
751 int w,h; 753 int w,h;
752 int index; 754 int index;
755 int update=0;
753 756
754 for ( index = 0; index < SCROLLABLE_LINES; index++ ) { 757 for ( index = 0; index < SCROLLABLE_LINES; index++ ) {
755 s = &scroll[index]; 758 s = &scroll[index];
@@ -765,10 +768,12 @@ void lcd_stop_scroll_line(int line)
765 /* restore scrolled row */ 768 /* restore scrolled row */
766 lcd_puts(s->startx, s->starty, s->line); 769 lcd_puts(s->startx, s->starty, s->line);
767 s->mode = SCROLL_MODE_OFF; 770 s->mode = SCROLL_MODE_OFF;
771 update++;
768 } 772 }
769 } 773 }
770 774 if(update)
771 lcd_update(); 775 /* only updated if need be */
776 lcd_update();
772} 777}
773 778
774void lcd_scroll_pause(void) 779void lcd_scroll_pause(void)