summaryrefslogtreecommitdiff
path: root/apps
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
parent0edf98c9d72bef33c169f2bd0dacceabc3670044 (diff)
downloadrockbox-fd187ad14cb1248d804d208a92e8d4c8e69c0d12.tar.gz
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')
-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,
220static int playback_callback(int action,const struct menu_item_ex *this_item) 220static int playback_callback(int action,const struct menu_item_ex *this_item)
221{ 221{
222 static bool old_shuffle = false; 222 static bool old_shuffle = false;
223 static int old_repeat = 0;
223 switch (action) 224 switch (action)
224 { 225 {
225 case ACTION_ENTER_MENUITEM: 226 case ACTION_ENTER_MENUITEM:
226 if (this_item == &shuffle_item) 227 if (this_item == &shuffle_item)
228 {
227 old_shuffle = global_settings.playlist_shuffle; 229 old_shuffle = global_settings.playlist_shuffle;
230 }
231 else if (this_item == &repeat_mode)
232 {
233 old_repeat = global_settings.repeat_mode;
234 }
228 break; 235 break;
236
229 case ACTION_EXIT_MENUITEM: /* on exit */ 237 case ACTION_EXIT_MENUITEM: /* on exit */
230 if ((this_item == &shuffle_item) && 238 if (!(audio_status() & AUDIO_STATUS_PLAY))
231 (old_shuffle != global_settings.playlist_shuffle) 239 break;
232 && (audio_status() & AUDIO_STATUS_PLAY)) 240
241 if (this_item == &shuffle_item)
233 { 242 {
243 if (old_shuffle == global_settings.playlist_shuffle)
244 break;
245
234#if CONFIG_CODEC == SWCODEC 246#if CONFIG_CODEC == SWCODEC
235 dsp_set_replaygain(); 247 dsp_set_replaygain();
236#endif 248#endif
@@ -243,6 +255,14 @@ static int playback_callback(int action,const struct menu_item_ex *this_item)
243 playlist_sort(NULL, true); 255 playlist_sort(NULL, true);
244 } 256 }
245 } 257 }
258 else if (this_item == &repeat_mode)
259 {
260 if (old_repeat == global_settings.repeat_mode)
261 break;
262
263 audio_flush_and_reload_tracks();
264 }
265
246 break; 266 break;
247 } 267 }
248 return action; 268 return action;