From 40d713c5fc8ee1b9127fc81ce4bb97a50e2a4212 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sat, 20 Sep 2008 15:30:55 +0000 Subject: FS#9408 - dont bother saving the random seed in global status. I'm 99.9% sure this code was being ignored anyway. If this commit causes problems with restarting playback open a bug report (getting testers was difficult...) Settings which are stored in the nvram.bin file will be reset with this commit. this includes resume info, runtimes, "last screen" and a few others. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18555 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'apps/playlist.c') diff --git a/apps/playlist.c b/apps/playlist.c index 9c494778a3..1d42ba3728 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -300,7 +300,6 @@ static void empty_playlist(struct playlist_info* playlist, bool resume) /* Reset resume settings */ global_status.resume_first_index = 0; - global_status.resume_seed = -1; } } @@ -443,12 +442,6 @@ static int recreate_control(struct playlist_info* playlist) playlist->deleted = false; playlist->num_inserted_tracks = 0; - if (playlist->current) - { - global_status.resume_seed = -1; - status_save(); - } - for (i=0; iamount; i++) { if (playlist->indices[i] & PLAYLIST_INSERT_TYPE_MASK) @@ -989,8 +982,6 @@ static int randomise_playlist(struct playlist_info* playlist, { update_control(playlist, PLAYLIST_COMMAND_SHUFFLE, seed, playlist->first_index, NULL, NULL, NULL); - global_status.resume_seed = seed; - status_save(); } return 0; @@ -1029,8 +1020,6 @@ static int sort_playlist(struct playlist_info* playlist, bool start_current, { update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE, playlist->first_index, -1, NULL, NULL, NULL); - global_status.resume_seed = 0; - status_save(); } return 0; @@ -1819,12 +1808,6 @@ static int flush_cached_control(struct playlist_info* playlist) if (result > 0) { - if (global_status.resume_seed >= 0) - { - global_status.resume_seed = -1; - status_save(); - } - playlist->num_cached = 0; playlist->pending_control_sync = true; @@ -2207,7 +2190,6 @@ int playlist_resume(void) if (randomise_playlist(playlist, seed, false, false) < 0) return -1; - sorted = false; break; } @@ -2372,21 +2354,6 @@ int playlist_resume(void) /* Terminate on EOF */ if(nread <= 0) { - if (global_status.resume_seed >= 0) - { - /* Apply shuffle command saved in settings */ - if (global_status.resume_seed == 0) - sort_playlist(playlist, false, true); - else - { - if (!sorted) - sort_playlist(playlist, false, false); - - randomise_playlist(playlist, global_status.resume_seed, - false, true); - } - } - playlist->first_index = global_status.resume_first_index; break; } -- cgit v1.2.3