diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-11-07 20:14:39 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-11-07 20:14:39 +0000 |
commit | 7088c12525affae5e3c93577629fa41e91d1e802 (patch) | |
tree | 40df2866b8990198e73a3d2afb6156d96659ec7a | |
parent | ed00708ac4b4117e9d4f83602ef3bee94951d09c (diff) |
Use set_int() for the crossfade time settings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7777 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/settings_menu.c | 47 |
1 files changed, 16 insertions, 31 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 22ed9c7fec..956d8f99de 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -1221,62 +1221,47 @@ static bool crossfade(void) return ret; } -static const struct opt_items crossfade_time[] = { - { "0s", TALK_ID(0, UNIT_SEC) }, - { "1s", TALK_ID(1, UNIT_SEC) }, - { "2s", TALK_ID(2, UNIT_SEC) }, - { "3s", TALK_ID(3, UNIT_SEC) }, - { "4s", TALK_ID(4, UNIT_SEC) }, - { "5s", TALK_ID(5, UNIT_SEC) }, - { "6s", TALK_ID(6, UNIT_SEC) }, - { "7s", TALK_ID(7, UNIT_SEC) }, - { "8s", TALK_ID(8, UNIT_SEC) }, - { "9s", TALK_ID(9, UNIT_SEC) }, - { "10s", TALK_ID(10, UNIT_SEC) }, - { "11s", TALK_ID(11, UNIT_SEC) }, - { "12s", TALK_ID(12, UNIT_SEC) }, - { "13s", TALK_ID(13, UNIT_SEC) }, - { "14s", TALK_ID(14, UNIT_SEC) }, - { "15s", TALK_ID(15, UNIT_SEC) }, -}; - static bool crossfade_fade_in_delay(void) { bool ret; - ret=set_option( str(LANG_CROSSFADE_FADE_IN_DELAY), - &global_settings.crossfade_fade_in_delay, INT, crossfade_time, 8, NULL); + + ret = set_int(str(LANG_CROSSFADE_FADE_IN_DELAY), "s", UNIT_SEC, + &global_settings.crossfade_fade_in_delay, + NULL, 1, 0, 7, NULL ); audio_set_crossfade(global_settings.crossfade); - return ret; } static bool crossfade_fade_out_delay(void) { bool ret; - ret=set_option( str(LANG_CROSSFADE_FADE_OUT_DELAY), - &global_settings.crossfade_fade_out_delay, INT, crossfade_time, 8, NULL); + + ret = set_int(str(LANG_CROSSFADE_FADE_OUT_DELAY), "s", UNIT_SEC, + &global_settings.crossfade_fade_out_delay, + NULL, 1, 0, 7, NULL ); audio_set_crossfade(global_settings.crossfade); - return ret; } static bool crossfade_fade_in_duration(void) { bool ret; - ret=set_option( str(LANG_CROSSFADE_FADE_IN_DURATION), - &global_settings.crossfade_fade_in_duration, INT, crossfade_time, 16, NULL); + + ret = set_int(str(LANG_CROSSFADE_FADE_IN_DURATION), "s", UNIT_SEC, + &global_settings.crossfade_fade_in_duration, + NULL, 1, 0, 15, NULL ); audio_set_crossfade(global_settings.crossfade); - return ret; } static bool crossfade_fade_out_duration(void) { bool ret; - ret=set_option( str(LANG_CROSSFADE_FADE_OUT_DURATION), - &global_settings.crossfade_fade_out_duration, INT, crossfade_time, 16, NULL); + + ret = set_int(str(LANG_CROSSFADE_FADE_OUT_DURATION), "s", UNIT_SEC, + &global_settings.crossfade_fade_out_duration, + NULL, 1, 0, 15, NULL ); audio_set_crossfade(global_settings.crossfade); - return ret; } |