summaryrefslogtreecommitdiff
path: root/apps/wps-display.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r--apps/wps-display.c55
1 files changed, 26 insertions, 29 deletions
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();