From 3735a15aca1c0c2649fb003f70ca6900d09a7731 Mon Sep 17 00:00:00 2001 From: Hardeep Sidhu Date: Fri, 11 Oct 2002 09:14:30 +0000 Subject: Retrieve the first_index from playlist when updating resume settings instead of incorrectly using start_index git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2575 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 5 +++++ apps/playlist.h | 1 + apps/tree.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/playlist.c b/apps/playlist.c index 1e5c12a181..3c512cd82f 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -106,6 +106,11 @@ int playlist_amount(void) return playlist.amount; } +int playlist_first_index(void) +{ + return playlist.first_index; +} + int playlist_next(int steps) { playlist.index = get_next_index(steps); diff --git a/apps/playlist.h b/apps/playlist.h index 24f9d7df6f..c47fec4325 100644 --- a/apps/playlist.h +++ b/apps/playlist.h @@ -53,5 +53,6 @@ void add_indices_to_playlist(void); void playlist_clear(void); int playlist_add(char *filename); int playlist_amount(void); +int playlist_first_index(void); #endif /* __PLAYLIST_H__ */ diff --git a/apps/tree.c b/apps/tree.c index 5cd803adfe..b35e44861c 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -906,7 +906,8 @@ bool dirbrowse(char *root) shuffled list in case shuffle is enabled */ global_settings.resume_index = start_index; global_settings.resume_offset = 0; - global_settings.resume_first_index = start_index; + global_settings.resume_first_index = + playlist_first_index(); global_settings.resume_seed = seed; settings_save(); } -- cgit v1.2.3