forked from len0rd/rockbox
avoid division by zero (appears in the sim at times)
fixed dynamicly updated scrolling lines git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3177 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bb3685edd8
commit
d5934e09a4
1 changed files with 4 additions and 3 deletions
|
@ -666,9 +666,11 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo
|
|||
/* progress */
|
||||
if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) {
|
||||
int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0;
|
||||
int percent=
|
||||
id3->length?
|
||||
(id3->elapsed + ff_rewind_count) * 100 / id3->length:0;
|
||||
slidebar(0, i*h + offset + 1, LCD_WIDTH, 6,
|
||||
(id3->elapsed + ff_rewind_count) * 100 / id3->length,
|
||||
Grow_Right);
|
||||
percent, Grow_Right);
|
||||
update_line = true;
|
||||
}
|
||||
if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) {
|
||||
|
@ -702,7 +704,6 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo
|
|||
if (refresh_mode & WPS_REFRESH_SCROLL) {
|
||||
lcd_puts_scroll(0, i, buf);
|
||||
}
|
||||
flags=0;
|
||||
}
|
||||
|
||||
/* dynamic / static line */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue