diff options
author | Justin Heiner <jheiner@rockbox.org> | 2002-09-04 01:51:09 +0000 |
---|---|---|
committer | Justin Heiner <jheiner@rockbox.org> | 2002-09-04 01:51:09 +0000 |
commit | ba349223bf8b80d6f52e30bf3dfcdbf030fd0933 (patch) | |
tree | 974a145a002a556ce721ad45e54c2a9ec9709914 /apps/wps-display.c | |
parent | 0ad2010865165120a521272eef68d00b6a7b2edc (diff) |
wps-display.c
* Made 'Remaining Time' count correctly when doing FF/REW.
* Fixed bug in player_progressbar that caused Illegal Instruction
if the FF/Play went past the end of the song.
wps.c
* Removed 'if(lastbutton!=BUTTON_LEFT)' from track changes.
It was causing tracks to not change unless button was pressed
numerous times quickly :-)
* For player, changed BUTTON_STOP to BUTTON_STOP | BUTTON_REL.
Since stop is also the key to turn the device off, we don't want
it to go to the dir browser unless the stop button is released.
settings_menu.c
* Changed the minimum disk spindown time to 3 seconds, due to
reported problems if set below that.
makefile.vc6
* Fixed the VC makefile to work with both Recorder & Player again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2159 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r-- | apps/wps-display.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c index f901f8fae0..5155764b9d 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c @@ -327,7 +327,7 @@ static char* get_tag(struct mp3entry* id3, case 'r': /* Remaining Time in Song */ flags->dynamic = true; - format_time(buf, buf_size, id3->length - id3->elapsed + ff_rewind_count); + format_time(buf, buf_size, id3->length - id3->elapsed - ff_rewind_count); return buf; case 't': /* Total Time */ @@ -645,10 +645,15 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count) memset(binline, 1, sizeof binline); memset(player_progressbar, 1, sizeof player_progressbar); - if(wps_time_countup == false) - songpos = ((id3->elapsed - ff_rewwind_count) * 36) / id3->length; + if(id3->elapsed >= id3->length) + songpos = 0; else - songpos = ((id3->elapsed + ff_rewwind_count) * 36) / id3->length; + { + if(wps_time_countup == false) + songpos = ((id3->elapsed - ff_rewwind_count) * 36) / id3->length; + else + songpos = ((id3->elapsed + ff_rewwind_count) * 36) / id3->length; + } for (i=0; i < songpos; i++) binline[i] = 0; |