From ba349223bf8b80d6f52e30bf3dfcdbf030fd0933 Mon Sep 17 00:00:00 2001 From: Justin Heiner Date: Wed, 4 Sep 2002 01:51:09 +0000 Subject: 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 --- apps/settings_menu.c | 2 +- apps/wps-display.c | 13 +++++++++---- apps/wps.c | 7 +------ uisimulator/win32/Makefile.vc6 | 10 +++++++++- 4 files changed, 20 insertions(+), 12 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) static Menu spindown(void) { set_int("[Disk spindown]", "s", &global_settings.disk_spindown, - ata_spindown, 1, 1, 254 ); + ata_spindown, 1, 3, 254 ); return MENU_OK; } 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; 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) /* prev / restart */ case BUTTON_LEFT | BUTTON_REL: - if ( lastbutton != BUTTON_LEFT ) - break; - if (!id3 || (id3->elapsed < 3*1000)) mpeg_prev(); else { @@ -905,8 +902,6 @@ int wps_show(void) /* next */ case BUTTON_RIGHT | BUTTON_REL: - if ( lastbutton != BUTTON_RIGHT ) - break; mpeg_next(); break; @@ -941,7 +936,7 @@ int wps_show(void) #ifdef HAVE_RECORDER_KEYPAD case BUTTON_OFF: #else - case BUTTON_STOP: + case BUTTON_STOP | BUTTON_REL: #endif #ifdef HAVE_LCD_CHARCELLS lcd_icon(ICON_RECORD, false); diff --git a/uisimulator/win32/Makefile.vc6 b/uisimulator/win32/Makefile.vc6 index e03d4ade4d..43e6990d38 100644 --- a/uisimulator/win32/Makefile.vc6 +++ b/uisimulator/win32/Makefile.vc6 @@ -17,21 +17,28 @@ # ############################################################################ + +#CHANGE THIS FIELD TO SPECIFY RECORDER OR PLAYER +TARGET = RECORDER + FIRMWAREDIR = ../../firmware DRIVERS = $(FIRMWAREDIR)/drivers COMMON = $(FIRMWAREDIR)/common APPSCOMMON = ../common SIMDIR = ../win32/ APPDIR = ../../apps/ +PLAYERDIR = $(APPDIR)player/ RECDIR = $(APPDIR)recorder/ RM = del !IF ("$(TARGET)" == "RECORDER") DISPLAY = -DHAVE_LCD_BITMAP KEYPAD = -DHAVE_RECORDER_KEYPAD +MODEL_SPECIFIC_DIR = $(RECDIR) !ELSE DISPLAY = -DHAVE_LCD_CHARCELLS KEYPAD = -DHAVE_PLAYER_KEYPAD +MODEL_SPECIFIC_DIR = $(PLAYERDIR) !ENDIF CC = cl @@ -39,7 +46,7 @@ RC = rc LINK = link DEFINES = -DWIN32 -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"WIN32SIM\" LDFLAGS = /OUT:uisw32.exe /SUBSYSTEM:windows /NOLOGO /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib -INCLUDES = -I$(FIRMWAREDIR) -I$(DRIVERS) -I$(COMMON) -I$(APPSCOMMON) -I$(SIMDIR) -I$(APPDIR) -I$(RECDIR) +INCLUDES = -I$(FIRMWAREDIR) -I$(DRIVERS) -I$(COMMON) -I$(APPSCOMMON) -I$(SIMDIR) -I$(APPDIR) -I$(MODEL_SPECIFIC_DIR) LIBS = /DEFAULTLIB:gdi32.lib /DEFAULTLIB:user32.lib CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb" /c @@ -47,6 +54,7 @@ CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb" /c SRCS = *.c \ $(DRIVERS)/lcd.c $(DRIVERS)/power.c \ $(APPDIR)*.c \ + $(PLAYERDIR)*.c \ $(APPSCOMMON)/*.c \ $(FIRMWAREDIR)/chartables.c $(FIRMWAREDIR)/id3.c $(FIRMWAREDIR)/usb.c $(FIRMWAREDIR)/mpeg.c \ $(FIRMWAREDIR)/powermgmt.c \ -- cgit v1.2.3