summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorNick Peskett <rockbox@peskett.co.uk>2012-03-19 09:56:38 +0000
committerNick Peskett <rockbox@peskett.co.uk>2012-03-19 11:49:55 +0100
commitbe10817e1c09d5a41710435cf6d58deb6dde9301 (patch)
tree4635fcb1ab51d2ef6dc1db28db045c369cf1abaf /apps/playback.c
parent69978d7046cd7e537c5079a5e306d22621a1767a (diff)
downloadrockbox-be10817e1c09d5a41710435cf6d58deb6dde9301.tar.gz
rockbox-be10817e1c09d5a41710435cf6d58deb6dde9301.zip
Option to constrain get_next_dir() to directories below global_settings.start_directory.
When enabled, if the user has set "Start File Browser Here" (config.cfg: start directory) to anything other than root and "Auto-Change Directory" is set to "Yes" or "Random", the directory returned when an auto change is required will be constrained to the value of "start directory" or below. Change-Id: Iaab773868c4cab5a54f6ae67bdb22e84642a9e4b Reviewed-on: http://gerrit.rockbox.org/182 Reviewed-by: Nick Peskett <rockbox@peskett.co.uk> Tested-by: Nick Peskett <rockbox@peskett.co.uk>
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 8fe43eb884..28f664357c 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -2644,8 +2644,17 @@ static void audio_on_skip(void)
2644 skip_pending = TRACK_SKIP_NONE; 2644 skip_pending = TRACK_SKIP_NONE;
2645 2645
2646 /* Update the playlist current track now */ 2646 /* Update the playlist current track now */
2647 while (playlist_next(playlist_delta) < 0) 2647 int pl_retval;
2648 while ((pl_retval = playlist_next(playlist_delta)) < 0)
2648 { 2649 {
2650 if (pl_retval < -1)
2651 {
2652 /* Some variety of fatal error while updating playlist */
2653 filling = STATE_ENDED;
2654 audio_stop_playback();
2655 return;
2656 }
2657
2649 /* Manual skip out of range (because the playlist wasn't updated 2658 /* Manual skip out of range (because the playlist wasn't updated
2650 yet by us and so the check in audio_skip returned 'ok') - bring 2659 yet by us and so the check in audio_skip returned 'ok') - bring
2651 back into range */ 2660 back into range */