summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-08-19 10:57:55 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-08-19 10:57:55 +0000
commitf210606c8f742508e6664a0d6c1f093677bcae65 (patch)
tree39b263beb3d08a82fda889420d31ee310bde80d1 /apps
parentc0ea4a7d1d6931b6ff034b5dae99add400b97eee (diff)
Expanded resume options: off/ask/on
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1797 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c2
-rw-r--r--apps/settings.h8
-rw-r--r--apps/settings_menu.c3
-rw-r--r--apps/tree.c4
4 files changed, 11 insertions, 6 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 41d04c2819..00510a9204 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -393,7 +393,7 @@ void settings_reset(void) {
global_settings.loudness = mpeg_sound_default(SOUND_LOUDNESS);
global_settings.bass_boost = mpeg_sound_default(SOUND_SUPERBASS);
global_settings.avc = mpeg_sound_default(SOUND_AVC);
- global_settings.resume = true;
+ global_settings.resume = RESUME_ASK;
global_settings.contrast = DEFAULT_CONTRAST_SETTING;
global_settings.poweroff = DEFAULT_POWEROFF_SETTING;
global_settings.backlight = DEFAULT_BACKLIGHT_SETTING;
diff --git a/apps/settings.h b/apps/settings.h
index f3f6d84327..16ab41f8d5 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -25,9 +25,9 @@
/* data structures */
-#define RESUME_NONE 0
-#define RESUME_SONG 1 /* resume song at startup */
-#define RESUME_PLAYLIST 2 /* resume playlist at startup */
+#define RESUME_OFF 0
+#define RESUME_ASK 1
+#define RESUME_ON 2
struct user_settings
{
@@ -50,7 +50,7 @@ struct user_settings
/* resume settings */
- bool resume; /* resume option on/off */
+ int resume; /* resume option: 0=off, 1=ask, 2=on */
int resume_index; /* index in playlist (-1 for no active resume) */
int resume_offset; /* byte offset in mp3 file */
int resume_seed; /* random seed for playlist shuffle */
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 08b1782850..334d55dabf 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -59,7 +59,8 @@ static void sort_case(void)
static void resume(void)
{
- set_bool( "[Resume]", &global_settings.resume );
+ char* names[] = { "off", "ask", "on " };
+ set_option( "[Resume]", &global_settings.resume, names, 3 );
}
static void backlight_timer(void)
diff --git a/apps/tree.c b/apps/tree.c
index cea092164b..1f1c924ef6 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -296,6 +296,10 @@ static int showdir(char *path, int start)
bool ask_resume(void)
{
+ /* always resume? */
+ if ( global_settings.resume == RESUME_ON )
+ return true;
+
#ifdef HAVE_NEW_CHARCELL_LCD
lcd_double_height(false);
#endif