diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-10-30 23:01:27 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-10-30 23:01:27 +0000 |
commit | a02ffd5afaa7a1a82f2da572b4c3cea01782b7c5 (patch) | |
tree | 015c75b9213e150503f37f12c300c90bd53948a9 /firmware/drivers | |
parent | d2df3c01dc34157fe3c0d414df7c68687f6aaedc (diff) | |
download | rockbox-a02ffd5afaa7a1a82f2da572b4c3cea01782b7c5.tar.gz rockbox-a02ffd5afaa7a1a82f2da572b4c3cea01782b7c5.zip |
Some peak meter optimizations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2784 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 10071dc3d7..16729464fc 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -823,7 +823,6 @@ static void scroll_thread(void) | |||
823 | int index; | 823 | int index; |
824 | int w, h; | 824 | int w, h; |
825 | int xpos, ypos; | 825 | int xpos, ypos; |
826 | bool update; | ||
827 | 826 | ||
828 | /* initialize scroll struct array */ | 827 | /* initialize scroll struct array */ |
829 | for (index = 0; index < SCROLLABLE_LINES; index++) { | 828 | for (index = 0; index < SCROLLABLE_LINES; index++) { |
@@ -834,15 +833,12 @@ static void scroll_thread(void) | |||
834 | 833 | ||
835 | while ( 1 ) { | 834 | while ( 1 ) { |
836 | 835 | ||
837 | update = false; | ||
838 | |||
839 | /* wait 0.5s before starting scroll */ | 836 | /* wait 0.5s before starting scroll */ |
840 | if ( TIME_AFTER(current_tick, scroll_start_tick) ) { | 837 | if ( TIME_AFTER(current_tick, scroll_start_tick) ) { |
841 | 838 | ||
842 | for ( index = 0; index < SCROLLABLE_LINES; index++ ) { | 839 | for ( index = 0; index < SCROLLABLE_LINES; index++ ) { |
843 | s = &scroll[index]; | 840 | s = &scroll[index]; |
844 | if ( s->mode == SCROLL_MODE_RUN ) { | 841 | if ( s->mode == SCROLL_MODE_RUN ) { |
845 | update = true; | ||
846 | 842 | ||
847 | s->offset += scroll_step; | 843 | s->offset += scroll_step; |
848 | 844 | ||
@@ -855,12 +851,9 @@ static void scroll_thread(void) | |||
855 | 851 | ||
856 | lcd_clearrect(xpos, ypos, LCD_WIDTH - xmargin, h); | 852 | lcd_clearrect(xpos, ypos, LCD_WIDTH - xmargin, h); |
857 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); | 853 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); |
854 | lcd_update_rect(xpos, ypos, LCD_WIDTH - xmargin, h); | ||
858 | } | 855 | } |
859 | } | 856 | } |
860 | |||
861 | if (update) { | ||
862 | lcd_update(); | ||
863 | } | ||
864 | } | 857 | } |
865 | 858 | ||
866 | sleep(HZ/scroll_speed); | 859 | sleep(HZ/scroll_speed); |