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
This commit is contained in:
parent
3d5fba9865
commit
40d713c5fc
4 changed files with 1 additions and 37 deletions
|
@ -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; i<playlist->amount; 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;
|
||||
}
|
||||
|
|
|
@ -271,8 +271,6 @@ struct system_status
|
|||
int resume_index; /* index in playlist (-1 for no active resume) */
|
||||
int resume_first_index; /* index of first track in playlist */
|
||||
uint32_t resume_offset; /* byte offset in mp3 file */
|
||||
int resume_seed; /* shuffle seed (-1=no resume shuffle 0=sorted
|
||||
>0=shuffled) */
|
||||
int runtime; /* current runtime since last charge */
|
||||
int topruntime; /* top known runtime */
|
||||
#ifdef HAVE_DIRCACHE
|
||||
|
|
|
@ -427,7 +427,6 @@ const struct settings_list settings[] = {
|
|||
SYSTEM_SETTING(NVRAM(4), resume_index, -1),
|
||||
SYSTEM_SETTING(NVRAM(4), resume_first_index, 0),
|
||||
SYSTEM_SETTING(NVRAM(4), resume_offset, -1),
|
||||
SYSTEM_SETTING(NVRAM(4), resume_seed, -1),
|
||||
CHOICE_SETTING(0, repeat_mode, LANG_REPEAT, REPEAT_ALL, "repeat",
|
||||
"off,all,one,shuffle"
|
||||
#ifdef AB_REPEAT_ENABLE
|
||||
|
|
|
@ -111,7 +111,7 @@ struct table_setting {
|
|||
|
||||
#define F_NVRAM_BYTES_MASK 0xE0000 /*0-4 bytes can be stored */
|
||||
#define F_NVRAM_MASK_SHIFT 17
|
||||
#define NVRAM_CONFIG_VERSION 4
|
||||
#define NVRAM_CONFIG_VERSION 5
|
||||
/* Above define should be bumped if
|
||||
- a new NVRAM setting is added between 2 other NVRAM settings
|
||||
- number of bytes for a NVRAM setting is changed
|
||||
|
|
Loading…
Reference in a new issue