diff options
author | Hardeep Sidhu <dyp@pobox.com> | 2002-10-06 05:50:41 +0000 |
---|---|---|
committer | Hardeep Sidhu <dyp@pobox.com> | 2002-10-06 05:50:41 +0000 |
commit | 83611fe8c32d99bb463358f5ec8e0ebe466f1f42 (patch) | |
tree | b91fa4d1e70adbccb10978b64db3c5d721b4b71c /apps/settings.c | |
parent | ac2e0f1c3286edff9027404d4d15bc5e2445a4a2 (diff) |
Store the first index of the playlist and use it when calculating the next index in repeat off mode so that shuffled dirplay works correctly when "play selected" is enabled.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2514 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/settings.c b/apps/settings.c index 0ba72df110..dab44fe229 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -112,6 +112,7 @@ modified unless the header & checksum test fails. Rest of config block, only saved to disk: +0xF4 (int) Playlist first index 0xF8 (int) Playlist shuffle seed 0xFC (char[260]) Resume playlist (path/to/dir or path/to/playlist.m3u) @@ -316,9 +317,11 @@ int settings_save( void ) config_block[0x1e] = (unsigned char)global_settings.peak_meter_release; config_block[0x1f] = (unsigned char)global_settings.repeat_mode; + memcpy(&config_block[0x24], &global_settings.total_uptime, 4); + + memcpy(&config_block[0xF4], &global_settings.resume_first_index, 4); memcpy(&config_block[0xF8], &global_settings.resume_seed, 4); - memcpy(&config_block[0x24], &global_settings.total_uptime, 4); strncpy(&config_block[0xFC], global_settings.resume_file, MAX_PATH); DEBUGF("+Resume file %s\n",global_settings.resume_file); @@ -471,11 +474,12 @@ void settings_load(void) if (config_block[0x1f] != 0xFF) global_settings.repeat_mode = config_block[0x1f]; - memcpy(&global_settings.resume_seed, &config_block[0xF8], 4); - if (config_block[0x24] != 0xFF) memcpy(&global_settings.total_uptime, &config_block[0x24], 4); + memcpy(&global_settings.resume_first_index, &config_block[0xF4], 4); + memcpy(&global_settings.resume_seed, &config_block[0xF8], 4); + strncpy(global_settings.resume_file, &config_block[0xFC], MAX_PATH); global_settings.resume_file[MAX_PATH]=0; } |