summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 6ca733cf37..fa9ba38106 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -68,7 +68,7 @@ offset abs
680x0d 0x21 <resume settings byte> 680x0d 0x21 <resume settings byte>
690x0e 0x22 <shuffle,mp3filter,sort_case,discharge,statusbar,show_hidden> 690x0e 0x22 <shuffle,mp3filter,sort_case,discharge,statusbar,show_hidden>
700x0f 0x23 <scroll speed> 700x0f 0x23 <scroll speed>
710x10 0x24 <ff/rewind accleration rate> 710x10 0x24 <ff/rewind min step, acceleration rate>
720x11 0x25 <AVC byte> 720x11 0x25 <AVC byte>
730x12 0x26 <(int) Resume playlist index, or -1 if no playlist resume> 730x12 0x26 <(int) Resume playlist index, or -1 if no playlist resume>
740x16 0x2a <(int) Byte offset into resume file> 740x16 0x2a <(int) Byte offset into resume file>
@@ -269,7 +269,9 @@ int settings_save( void )
269 269
270 config_block[0xf] = (unsigned char)(global_settings.scroll_speed << 3); 270 config_block[0xf] = (unsigned char)(global_settings.scroll_speed << 3);
271 271
272 config_block[0x10] = (unsigned char)global_settings.ff_rewind_accel; 272 config_block[0x10] = (unsigned char)
273 ((global_settings.ff_rewind_min_step & 15) << 4 |
274 (global_settings.ff_rewind_accel & 15));
273 config_block[0x11] = (unsigned char)global_settings.avc; 275 config_block[0x11] = (unsigned char)global_settings.avc;
274 config_block[0x1a] = (unsigned char)global_settings.disk_spindown; 276 config_block[0x1a] = (unsigned char)global_settings.disk_spindown;
275 277
@@ -358,8 +360,10 @@ void settings_load(void)
358 if (c != 31) 360 if (c != 31)
359 global_settings.scroll_speed = c; 361 global_settings.scroll_speed = c;
360 362
361 if (config_block[0x10] != 0xFF) 363 if (config_block[0x10] != 0xFF) {
362 global_settings.ff_rewind_accel = config_block[0x10]; 364 global_settings.ff_rewind_min_step = (config_block[0x10] >> 4) & 15;
365 global_settings.ff_rewind_accel = config_block[0x10] & 15;
366 }
363 367
364 if (config_block[0x11] != 0xFF) 368 if (config_block[0x11] != 0xFF)
365 global_settings.avc = config_block[0x11]; 369 global_settings.avc = config_block[0x11];
@@ -418,6 +422,7 @@ void settings_reset(void) {
418 global_settings.total_uptime = 0; 422 global_settings.total_uptime = 0;
419 global_settings.scroll_speed = 8; 423 global_settings.scroll_speed = 8;
420 global_settings.show_hidden_files = false; 424 global_settings.show_hidden_files = false;
425 global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP;
421 global_settings.ff_rewind_accel = DEFAULT_FF_REWIND_ACCEL_SETTING; 426 global_settings.ff_rewind_accel = DEFAULT_FF_REWIND_ACCEL_SETTING;
422 global_settings.resume_index = -1; 427 global_settings.resume_index = -1;
423 global_settings.resume_offset = -1; 428 global_settings.resume_offset = -1;