summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJustin Heiner <jheiner@rockbox.org>2002-09-04 01:51:09 +0000
committerJustin Heiner <jheiner@rockbox.org>2002-09-04 01:51:09 +0000
commitba349223bf8b80d6f52e30bf3dfcdbf030fd0933 (patch)
tree974a145a002a556ce721ad45e54c2a9ec9709914 /apps
parent0ad2010865165120a521272eef68d00b6a7b2edc (diff)
downloadrockbox-ba349223bf8b80d6f52e30bf3dfcdbf030fd0933.tar.gz
rockbox-ba349223bf8b80d6f52e30bf3dfcdbf030fd0933.zip
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')
-rw-r--r--apps/settings_menu.c2
-rw-r--r--apps/wps-display.c13
-rw-r--r--apps/wps.c7
3 files changed, 11 insertions, 11 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index da2098e921..cb85af317c 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -150,7 +150,7 @@ static Menu timedate_set(void)
150static Menu spindown(void) 150static Menu spindown(void)
151{ 151{
152 set_int("[Disk spindown]", "s", &global_settings.disk_spindown, 152 set_int("[Disk spindown]", "s", &global_settings.disk_spindown,
153 ata_spindown, 1, 1, 254 ); 153 ata_spindown, 1, 3, 254 );
154 return MENU_OK; 154 return MENU_OK;
155} 155}
156 156
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,
327 327
328 case 'r': /* Remaining Time in Song */ 328 case 'r': /* Remaining Time in Song */
329 flags->dynamic = true; 329 flags->dynamic = true;
330 format_time(buf, buf_size, id3->length - id3->elapsed + ff_rewind_count); 330 format_time(buf, buf_size, id3->length - id3->elapsed - ff_rewind_count);
331 return buf; 331 return buf;
332 332
333 case 't': /* Total Time */ 333 case 't': /* Total Time */
@@ -645,10 +645,15 @@ bool draw_player_progress(struct mp3entry* id3, int ff_rewwind_count)
645 645
646 memset(binline, 1, sizeof binline); 646 memset(binline, 1, sizeof binline);
647 memset(player_progressbar, 1, sizeof player_progressbar); 647 memset(player_progressbar, 1, sizeof player_progressbar);
648 if(wps_time_countup == false) 648 if(id3->elapsed >= id3->length)
649 songpos = ((id3->elapsed - ff_rewwind_count) * 36) / id3->length; 649 songpos = 0;
650 else 650 else
651 songpos = ((id3->elapsed + ff_rewwind_count) * 36) / id3->length; 651 {
652 if(wps_time_countup == false)
653 songpos = ((id3->elapsed - ff_rewwind_count) * 36) / id3->length;
654 else
655 songpos = ((id3->elapsed + ff_rewwind_count) * 36) / id3->length;
656 }
652 for (i=0; i < songpos; i++) 657 for (i=0; i < songpos; i++)
653 binline[i] = 0; 658 binline[i] = 0;
654 659
diff --git a/apps/wps.c b/apps/wps.c
index e894cad774..1bd2c6405d 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -887,9 +887,6 @@ int wps_show(void)
887 887
888 /* prev / restart */ 888 /* prev / restart */
889 case BUTTON_LEFT | BUTTON_REL: 889 case BUTTON_LEFT | BUTTON_REL:
890 if ( lastbutton != BUTTON_LEFT )
891 break;
892
893 if (!id3 || (id3->elapsed < 3*1000)) 890 if (!id3 || (id3->elapsed < 3*1000))
894 mpeg_prev(); 891 mpeg_prev();
895 else { 892 else {
@@ -905,8 +902,6 @@ int wps_show(void)
905 902
906 /* next */ 903 /* next */
907 case BUTTON_RIGHT | BUTTON_REL: 904 case BUTTON_RIGHT | BUTTON_REL:
908 if ( lastbutton != BUTTON_RIGHT )
909 break;
910 mpeg_next(); 905 mpeg_next();
911 break; 906 break;
912 907
@@ -941,7 +936,7 @@ int wps_show(void)
941#ifdef HAVE_RECORDER_KEYPAD 936#ifdef HAVE_RECORDER_KEYPAD
942 case BUTTON_OFF: 937 case BUTTON_OFF:
943#else 938#else
944 case BUTTON_STOP: 939 case BUTTON_STOP | BUTTON_REL:
945#endif 940#endif
946#ifdef HAVE_LCD_CHARCELLS 941#ifdef HAVE_LCD_CHARCELLS
947 lcd_icon(ICON_RECORD, false); 942 lcd_icon(ICON_RECORD, false);