diff options
author | Kjell Ericson <kjell@haxx.se> | 2003-01-23 14:28:16 +0000 |
---|---|---|
committer | Kjell Ericson <kjell@haxx.se> | 2003-01-23 14:28:16 +0000 |
commit | 767d604bcd839ef996aad8b9ab1e394aca26a95c (patch) | |
tree | 7fabc73bcb938d8cc02bbfbfd20d9a3cb31a5d74 | |
parent | f5d9584eacc2eeaea7665169a12df4055c5d1de1 (diff) | |
download | rockbox-767d604bcd839ef996aad8b9ab1e394aca26a95c.tar.gz rockbox-767d604bcd839ef996aad8b9ab1e394aca26a95c.zip |
Removed unnecessary calls to lcd_stop_scroll().
Changed all lcd_scroll_pause() to lcd_stop_scroll().
Updated the tree system for new scroll-behaviour.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3154 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/menu.c | 7 | ||||
-rw-r--r-- | apps/recorder/recording.c | 2 | ||||
-rw-r--r-- | apps/screens.c | 4 | ||||
-rw-r--r-- | apps/tree.c | 9 | ||||
-rw-r--r-- | apps/wps-display.c | 55 | ||||
-rw-r--r-- | apps/wps.c | 4 |
6 files changed, 35 insertions, 46 deletions
diff --git a/apps/menu.c b/apps/menu.c index b38821e9e9..9cedbebed8 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -134,7 +134,6 @@ static void menu_draw(int m) | |||
134 | int menu_lines = MENU_LINES; | 134 | int menu_lines = MENU_LINES; |
135 | #endif | 135 | #endif |
136 | 136 | ||
137 | lcd_scroll_pause(); /* halt scroll first... */ | ||
138 | lcd_clear_display(); /* ...then clean the screen */ | 137 | lcd_clear_display(); /* ...then clean the screen */ |
139 | #ifdef HAVE_LCD_BITMAP | 138 | #ifdef HAVE_LCD_BITMAP |
140 | lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */ | 139 | lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */ |
@@ -289,14 +288,12 @@ bool menu_run(int m) | |||
289 | #endif | 288 | #endif |
290 | case BUTTON_PLAY: | 289 | case BUTTON_PLAY: |
291 | /* Erase current display state */ | 290 | /* Erase current display state */ |
292 | lcd_scroll_pause(); /* pause is better than stop when | ||
293 | are gonna clear the screen anyway */ | ||
294 | lcd_clear_display(); | 291 | lcd_clear_display(); |
295 | 292 | ||
296 | /* if a child returns that USB was used, | 293 | /* if a child returns that USB was used, |
297 | we return immediately */ | 294 | we return immediately */ |
298 | if (menus[m].items[menus[m].cursor].function()) { | 295 | if (menus[m].items[menus[m].cursor].function()) { |
299 | lcd_scroll_pause(); /* just in case */ | 296 | lcd_stop_scroll(); /* just in case */ |
300 | return true; | 297 | return true; |
301 | } | 298 | } |
302 | 299 | ||
@@ -311,7 +308,7 @@ bool menu_run(int m) | |||
311 | case BUTTON_STOP: | 308 | case BUTTON_STOP: |
312 | case BUTTON_MENU: | 309 | case BUTTON_MENU: |
313 | #endif | 310 | #endif |
314 | lcd_scroll_pause(); | 311 | lcd_stop_scroll(); |
315 | exit = true; | 312 | exit = true; |
316 | break; | 313 | break; |
317 | 314 | ||
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 15915d22f7..73b2773e44 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -458,7 +458,6 @@ bool f2_rec_screen(void) | |||
458 | 458 | ||
459 | lcd_setfont(FONT_SYSFIXED); | 459 | lcd_setfont(FONT_SYSFIXED); |
460 | lcd_getstringsize("A",&w,&h); | 460 | lcd_getstringsize("A",&w,&h); |
461 | lcd_stop_scroll(); | ||
462 | 461 | ||
463 | while (!exit) { | 462 | while (!exit) { |
464 | char* ptr=NULL; | 463 | char* ptr=NULL; |
@@ -573,7 +572,6 @@ bool f3_rec_screen(void) | |||
573 | 572 | ||
574 | lcd_setfont(FONT_SYSFIXED); | 573 | lcd_setfont(FONT_SYSFIXED); |
575 | lcd_getstringsize("A",&w,&h); | 574 | lcd_getstringsize("A",&w,&h); |
576 | lcd_stop_scroll(); | ||
577 | 575 | ||
578 | while (!exit) { | 576 | while (!exit) { |
579 | char* ptr=NULL; | 577 | char* ptr=NULL; |
diff --git a/apps/screens.c b/apps/screens.c index b4e23ccf57..71ab419261 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -72,7 +72,6 @@ static unsigned char usb_logo[] = { | |||
72 | 72 | ||
73 | void usb_display_info(void) | 73 | void usb_display_info(void) |
74 | { | 74 | { |
75 | lcd_stop_scroll(); | ||
76 | lcd_clear_display(); | 75 | lcd_clear_display(); |
77 | 76 | ||
78 | #ifdef HAVE_LCD_BITMAP | 77 | #ifdef HAVE_LCD_BITMAP |
@@ -132,7 +131,6 @@ int on_screen(void) | |||
132 | char buf[32]; | 131 | char buf[32]; |
133 | int w, h; | 132 | int w, h; |
134 | 133 | ||
135 | lcd_scroll_pause(); | ||
136 | lcd_clear_display(); | 134 | lcd_clear_display(); |
137 | lcd_setfont(FONT_SYSFIXED); | 135 | lcd_setfont(FONT_SYSFIXED); |
138 | 136 | ||
@@ -265,7 +263,6 @@ bool f2_screen(void) | |||
265 | 263 | ||
266 | lcd_setfont(FONT_SYSFIXED); | 264 | lcd_setfont(FONT_SYSFIXED); |
267 | lcd_getstringsize("A",&w,&h); | 265 | lcd_getstringsize("A",&w,&h); |
268 | lcd_stop_scroll(); | ||
269 | 266 | ||
270 | while (!exit) { | 267 | while (!exit) { |
271 | char* ptr=NULL; | 268 | char* ptr=NULL; |
@@ -390,7 +387,6 @@ bool f3_screen(void) | |||
390 | bool exit = false; | 387 | bool exit = false; |
391 | bool used = false; | 388 | bool used = false; |
392 | 389 | ||
393 | lcd_stop_scroll(); | ||
394 | lcd_setfont(FONT_SYSFIXED); | 390 | lcd_setfont(FONT_SYSFIXED); |
395 | 391 | ||
396 | while (!exit) { | 392 | while (!exit) { |
diff --git a/apps/tree.c b/apps/tree.c index 0cb958447f..e732794d2a 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -636,7 +636,6 @@ static int onplay_screen(char* dir, char* file) | |||
636 | else | 636 | else |
637 | snprintf(buf, sizeof buf, "%s/%s", dir, file); | 637 | snprintf(buf, sizeof buf, "%s/%s", dir, file); |
638 | 638 | ||
639 | lcd_stop_scroll(); | ||
640 | lcd_clear_display(); | 639 | lcd_clear_display(); |
641 | #ifdef HAVE_LCD_BITMAP | 640 | #ifdef HAVE_LCD_BITMAP |
642 | { | 641 | { |
@@ -770,6 +769,8 @@ static int onplay_screen(char* dir, char* file) | |||
770 | return false; | 769 | return false; |
771 | } | 770 | } |
772 | 771 | ||
772 | |||
773 | |||
773 | static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen) | 774 | static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen) |
774 | { | 775 | { |
775 | bool exit = false; | 776 | bool exit = false; |
@@ -864,6 +865,7 @@ bool dirbrowse(char *root) | |||
864 | bool reload_root = false; | 865 | bool reload_root = false; |
865 | int lastfilter = global_settings.dirfilter; | 866 | int lastfilter = global_settings.dirfilter; |
866 | bool lastsortcase = global_settings.sort_case; | 867 | bool lastsortcase = global_settings.sort_case; |
868 | int lastdircursor=-1; | ||
867 | #ifdef HAVE_LCD_BITMAP | 869 | #ifdef HAVE_LCD_BITMAP |
868 | int fw, fh; | 870 | int fw, fh; |
869 | lcd_getstringsize("A", &fw, &fh); | 871 | lcd_getstringsize("A", &fw, &fh); |
@@ -1275,8 +1277,11 @@ bool dirbrowse(char *root) | |||
1275 | 1277 | ||
1276 | /* if MP3 filter is on, cut off the extension */ | 1278 | /* if MP3 filter is on, cut off the extension */ |
1277 | if(lasti!=i || restore) { | 1279 | if(lasti!=i || restore) { |
1278 | lasti=i; | ||
1279 | lcd_stop_scroll(); | 1280 | lcd_stop_scroll(); |
1281 | if (lastdircursor!=-1) | ||
1282 | lcd_puts(LINE_X, lastdircursor, dircache[lasti].name); | ||
1283 | lasti=i; | ||
1284 | lastdircursor=dircursor; | ||
1280 | if (global_settings.dirfilter == SHOW_MUSIC && | 1285 | if (global_settings.dirfilter == SHOW_MUSIC && |
1281 | (dircache[i].attr & (TREE_ATTR_M3U|TREE_ATTR_MPA))) | 1286 | (dircache[i].attr & (TREE_ATTR_M3U|TREE_ATTR_MPA))) |
1282 | { | 1287 | { |
diff --git a/apps/wps-display.c b/apps/wps-display.c index 4ea2a0bed2..dfbc6d2cb6 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -670,29 +670,25 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo | |||
670 | (id3->elapsed + ff_rewind_count) * 100 / id3->length, | 670 | (id3->elapsed + ff_rewind_count) * 100 / id3->length, |
671 | Grow_Right); | 671 | Grow_Right); |
672 | update_line = true; | 672 | update_line = true; |
673 | } else if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) { | 673 | } |
674 | /* peak meter */ | 674 | if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) { |
675 | int peak_meter_y; | 675 | /* peak meter */ |
676 | int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0; | 676 | int peak_meter_y; |
677 | 677 | int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0; | |
678 | update_line = true; | 678 | |
679 | peak_meter_y = i * h + offset; | 679 | update_line = true; |
680 | 680 | peak_meter_y = i * h + offset; | |
681 | /* The user might decide to have the peak meter in the last | 681 | |
682 | line so that it is only displayed if no status bar is | 682 | /* The user might decide to have the peak meter in the last |
683 | visible. If so we neither want do draw nor enable the | 683 | line so that it is only displayed if no status bar is |
684 | peak meter. */ | 684 | visible. If so we neither want do draw nor enable the |
685 | if (peak_meter_y + h <= LCD_HEIGHT) { | 685 | peak meter. */ |
686 | /* found a line with a peak meter -> remember that we must | 686 | if (peak_meter_y + h <= LCD_HEIGHT) { |
687 | enable it later */ | 687 | /* found a line with a peak meter -> remember that we must |
688 | enable_pm = true; | 688 | enable it later */ |
689 | peak_meter_draw(0, peak_meter_y, LCD_WIDTH, | 689 | enable_pm = true; |
690 | MIN(h, LCD_HEIGHT - peak_meter_y)); | 690 | peak_meter_draw(0, peak_meter_y, LCD_WIDTH, |
691 | } | 691 | MIN(h, LCD_HEIGHT - peak_meter_y)); |
692 | } else if (flags & WPS_REFRESH_SCROLL) { | ||
693 | /* scroll line */ | ||
694 | if (refresh_mode & WPS_REFRESH_SCROLL) { | ||
695 | lcd_puts_scroll(0, i, buf); | ||
696 | } | 692 | } |
697 | } | 693 | } |
698 | #else | 694 | #else |
@@ -700,14 +696,14 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo | |||
700 | if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) { | 696 | if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) { |
701 | draw_player_progress(id3, ff_rewind_count); | 697 | draw_player_progress(id3, ff_rewind_count); |
702 | } | 698 | } |
699 | #endif | ||
703 | if (flags & WPS_REFRESH_SCROLL) { | 700 | if (flags & WPS_REFRESH_SCROLL) { |
704 | /* scroll line */ | 701 | /* scroll line */ |
705 | if (refresh_mode & WPS_REFRESH_SCROLL) { | 702 | if (refresh_mode & WPS_REFRESH_SCROLL) { |
706 | lcd_puts_scroll(0, i, buf); | 703 | lcd_puts_scroll(0, i, buf); |
707 | } | 704 | } |
708 | flags=0; | 705 | flags=0; |
709 | } | 706 | } |
710 | #endif | ||
711 | 707 | ||
712 | /* dynamic / static line */ | 708 | /* dynamic / static line */ |
713 | if ((flags & refresh_mode & WPS_REFRESH_DYNAMIC) || | 709 | if ((flags & refresh_mode & WPS_REFRESH_DYNAMIC) || |
@@ -767,6 +763,7 @@ bool wps_display(struct mp3entry* id3) | |||
767 | } | 763 | } |
768 | } | 764 | } |
769 | } | 765 | } |
766 | yield(); | ||
770 | wps_refresh(id3, 0, WPS_REFRESH_ALL); | 767 | wps_refresh(id3, 0, WPS_REFRESH_ALL); |
771 | status_draw(); | 768 | status_draw(); |
772 | lcd_update(); | 769 | lcd_update(); |
diff --git a/apps/wps.c b/apps/wps.c index b297b3a89a..14ed88e8eb 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -110,7 +110,6 @@ void player_change_volume(int button) | |||
110 | 110 | ||
111 | void display_keylock_text(bool locked) | 111 | void display_keylock_text(bool locked) |
112 | { | 112 | { |
113 | lcd_stop_scroll(); | ||
114 | lcd_clear_display(); | 113 | lcd_clear_display(); |
115 | 114 | ||
116 | #ifdef HAVE_LCD_CHARCELLS | 115 | #ifdef HAVE_LCD_CHARCELLS |
@@ -131,7 +130,6 @@ void display_keylock_text(bool locked) | |||
131 | 130 | ||
132 | void display_mute_text(bool muted) | 131 | void display_mute_text(bool muted) |
133 | { | 132 | { |
134 | lcd_stop_scroll(); | ||
135 | lcd_clear_display(); | 133 | lcd_clear_display(); |
136 | 134 | ||
137 | #ifdef HAVE_LCD_CHARCELLS | 135 | #ifdef HAVE_LCD_CHARCELLS |
@@ -158,7 +156,6 @@ static int browse_id3(void) | |||
158 | bool exit = false; | 156 | bool exit = false; |
159 | char scroll_text[MAX_PATH]; | 157 | char scroll_text[MAX_PATH]; |
160 | 158 | ||
161 | lcd_stop_scroll(); | ||
162 | lcd_clear_display(); | 159 | lcd_clear_display(); |
163 | lcd_puts(0, 0, str(LANG_ID3_INFO)); | 160 | lcd_puts(0, 0, str(LANG_ID3_INFO)); |
164 | lcd_puts(0, 1, str(LANG_ID3_SCREEN)); | 161 | lcd_puts(0, 1, str(LANG_ID3_SCREEN)); |
@@ -167,7 +164,6 @@ static int browse_id3(void) | |||
167 | 164 | ||
168 | while (!exit) | 165 | while (!exit) |
169 | { | 166 | { |
170 | lcd_stop_scroll(); | ||
171 | lcd_clear_display(); | 167 | lcd_clear_display(); |
172 | 168 | ||
173 | switch (menu_pos) | 169 | switch (menu_pos) |