summaryrefslogtreecommitdiffstats
path: root/apps/menus
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-10-29 20:41:20 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-10-29 20:41:20 +0000
commitfd187ad14cb1248d804d208a92e8d4c8e69c0d12 (patch)
treef991588d9c3d91dccd12b14269b4e32914c54fe1 /apps/menus
parent0edf98c9d72bef33c169f2bd0dacceabc3670044 (diff)
downloadrockbox-fd187ad14cb1248d804d208a92e8d4c8e69c0d12.tar.gz
rockbox-fd187ad14cb1248d804d208a92e8d4c8e69c0d12.tar.bz2
rockbox-fd187ad14cb1248d804d208a92e8d4c8e69c0d12.zip
Fix FS#12356 : next track advances when skip in repeat one mode. audio_flush_and_reload_track wasn't called when the setting changed from the playback menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30857 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/playback_menu.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c
index a219373a8b..d5b20d09f5 100644
--- a/apps/menus/playback_menu.c
+++ b/apps/menus/playback_menu.c
@@ -220,17 +220,29 @@ MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
static int playback_callback(int action,const struct menu_item_ex *this_item)
{
static bool old_shuffle = false;
+ static int old_repeat = 0;
switch (action)
{
case ACTION_ENTER_MENUITEM:
if (this_item == &shuffle_item)
+ {
old_shuffle = global_settings.playlist_shuffle;
+ }
+ else if (this_item == &repeat_mode)
+ {
+ old_repeat = global_settings.repeat_mode;
+ }
break;
+
case ACTION_EXIT_MENUITEM: /* on exit */
- if ((this_item == &shuffle_item) &&
- (old_shuffle != global_settings.playlist_shuffle)
- && (audio_status() & AUDIO_STATUS_PLAY))
+ if (!(audio_status() & AUDIO_STATUS_PLAY))
+ break;
+
+ if (this_item == &shuffle_item)
{
+ if (old_shuffle == global_settings.playlist_shuffle)
+ break;
+
#if CONFIG_CODEC == SWCODEC
dsp_set_replaygain();
#endif
@@ -243,6 +255,14 @@ static int playback_callback(int action,const struct menu_item_ex *this_item)
playlist_sort(NULL, true);
}
}
+ else if (this_item == &repeat_mode)
+ {
+ if (old_repeat == global_settings.repeat_mode)
+ break;
+
+ audio_flush_and_reload_tracks();
+ }
+
break;
}
return action;