diff options
author | Hardeep Sidhu <dyp@pobox.com> | 2003-08-06 16:16:21 +0000 |
---|---|---|
committer | Hardeep Sidhu <dyp@pobox.com> | 2003-08-06 16:16:21 +0000 |
commit | 143da86b021242944c5d594a550dd91d757e1fa0 (patch) | |
tree | 7b150e62d754527ce637112c64963edb9c227164 /apps/wps-display.c | |
parent | 8abc9d471a66fcbb2e571b823580279e9a8f61ff (diff) | |
download | rockbox-143da86b021242944c5d594a550dd91d757e1fa0.tar.gz rockbox-143da86b021242944c5d594a550dd91d757e1fa0.zip |
Take statusbar into account when updating a line
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3924 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r-- | apps/wps-display.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c index d3c2613a1e..2754dba8ad 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -668,6 +668,7 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo | |||
668 | bool update_line; | 668 | bool update_line; |
669 | #ifdef HAVE_LCD_BITMAP | 669 | #ifdef HAVE_LCD_BITMAP |
670 | int h = font_get(FONT_UI)->height; | 670 | int h = font_get(FONT_UI)->height; |
671 | int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0; | ||
671 | /* to find out wether the peak meter is enabled we | 672 | /* to find out wether the peak meter is enabled we |
672 | assume it wasn't until we find a line that contains | 673 | assume it wasn't until we find a line that contains |
673 | the peak meter. We can't use peak_meter_enabled itself | 674 | the peak meter. We can't use peak_meter_enabled itself |
@@ -708,7 +709,6 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo | |||
708 | #ifdef HAVE_LCD_BITMAP | 709 | #ifdef HAVE_LCD_BITMAP |
709 | /* progress */ | 710 | /* progress */ |
710 | if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) { | 711 | if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) { |
711 | int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0; | ||
712 | int percent= | 712 | int percent= |
713 | id3->length? | 713 | id3->length? |
714 | (id3->elapsed + ff_rewind_count) * 100 / id3->length:0; | 714 | (id3->elapsed + ff_rewind_count) * 100 / id3->length:0; |
@@ -719,7 +719,6 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo | |||
719 | if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) { | 719 | if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) { |
720 | /* peak meter */ | 720 | /* peak meter */ |
721 | int peak_meter_y; | 721 | int peak_meter_y; |
722 | int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0; | ||
723 | 722 | ||
724 | update_line = true; | 723 | update_line = true; |
725 | peak_meter_y = i * h + offset; | 724 | peak_meter_y = i * h + offset; |
@@ -763,7 +762,7 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo | |||
763 | } | 762 | } |
764 | #ifdef HAVE_LCD_BITMAP | 763 | #ifdef HAVE_LCD_BITMAP |
765 | if (update_line) { | 764 | if (update_line) { |
766 | lcd_update_rect(0, i * h, LCD_WIDTH, h); | 765 | lcd_update_rect(0, i*h + offset, LCD_WIDTH, h); |
767 | } | 766 | } |
768 | #endif | 767 | #endif |
769 | } | 768 | } |