summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2003-06-01 00:41:46 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2003-06-01 00:41:46 +0000
commit87d5cfe4b76aaa02aac802c32d63064a2bfe9736 (patch)
treee388f5b991e20bc4cfbac23a63d9807485bb65f6 /apps/tree.c
parent6e05780ee1f97335823b4fa0f7d1ab11182cfb6c (diff)
Patch #700467, corrects a bug when shuffling with play-selected-first set to No
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3714 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 4499863ae2..acfc7ee263 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -906,9 +906,16 @@ bool dirbrowse(char *root)
if ( global_settings.resume )
strncpy(global_settings.resume_file,
currdir, MAX_PATH);
+
start_index =
build_playlist(dircursor+dirstart);
+ /* when shuffling dir.: play all files even if the
+ file selected by user is not the first one */
+ if (global_settings.playlist_shuffle
+ && !global_settings.play_selected)
+ start_index = 0;
+
/* it is important that we get back the index
in the (shuffled) list and store that */
start_index = play_list(currdir, NULL,