diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2011-07-31 12:56:00 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2011-07-31 12:56:00 +0000 |
commit | 92b392e722b7e5e576dc22a7c230e58d1038da42 (patch) | |
tree | 5ccadd6ead9c3c78341f11a1c75f69911fbf572f /apps | |
parent | ffded5fcf8a84b5c699560ed59ddd43b651f2698 (diff) |
Reload the current playlist after reboot even if it has ended. (FS#11644)
This is done to make reboot more transparent. If a playlist has ended, there should be no difference between the player doing nothing for ten minutes and the player shutting down after the idle timeout and being restarted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30226 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 4 | ||||
-rw-r--r-- | apps/playlist_viewer.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c index fe9bd579d4..19e7e1276f 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -3796,4 +3796,8 @@ void audio_init(void) #endif codec_thread_resume(); thread_thaw(audio_thread_id); + + /* Load the old playlist, to ensure that behaviour with and without + * rebooting is consistent */ + playlist_resume(); } diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 940a6d77dc..414fdd5f8d 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -278,7 +278,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer, size_t buffer_size; bool is_playing = audio_status() & (AUDIO_STATUS_PLAY | AUDIO_STATUS_PAUSE); bool have_list = filename || is_playing; - if (!have_list && (global_status.resume_index != -1)) + if (!have_list) { /* Try to restore the list from control file */ have_list = (playlist_resume() != -1); |