summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 328061d6ef..f61db32b56 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -104,7 +104,7 @@ offset abs
1040x22 0x36 <rec. quality (bit 0-2), source (bit 3-4), frequency (bit 5-7)> 1040x22 0x36 <rec. quality (bit 0-2), source (bit 3-4), frequency (bit 5-7)>
1050x23 0x37 <rec. left gain (bit 0-3)> 1050x23 0x37 <rec. left gain (bit 0-3)>
1060x24 0x38 <rec. right gain (bit 0-3)> 1060x24 0x38 <rec. right gain (bit 0-3)>
107 1070x25 0x39 <disk_spindown flag>
108 108
109 <all unused space filled with 0xff> 109 <all unused space filled with 0xff>
110 110
@@ -341,6 +341,7 @@ int settings_save( void )
341 ((global_settings.rec_frequency & 7) << 5)); 341 ((global_settings.rec_frequency & 7) << 5));
342 config_block[0x23] = (unsigned char)global_settings.rec_left_gain; 342 config_block[0x23] = (unsigned char)global_settings.rec_left_gain;
343 config_block[0x24] = (unsigned char)global_settings.rec_right_gain; 343 config_block[0x24] = (unsigned char)global_settings.rec_right_gain;
344 config_block[0x25] = (unsigned char)global_settings.disk_poweroff & 1;
344 345
345 strncpy(&config_block[0xb8], global_settings.wps_file, MAX_FILENAME); 346 strncpy(&config_block[0xb8], global_settings.wps_file, MAX_FILENAME);
346 strncpy(&config_block[0xcc], global_settings.lang_file, MAX_FILENAME); 347 strncpy(&config_block[0xcc], global_settings.lang_file, MAX_FILENAME);
@@ -593,6 +594,9 @@ void settings_load(void)
593 if (config_block[0x24] != 0xFF) 594 if (config_block[0x24] != 0xFF)
594 global_settings.rec_right_gain = config_block[0x24] & 0x0f; 595 global_settings.rec_right_gain = config_block[0x24] & 0x0f;
595 596
597 if (config_block[0x25] != 0xFF)
598 global_settings.disk_poweroff = config_block[0x25] & 1;
599
596 memcpy(&global_settings.resume_first_index, &config_block[0xF4], 4); 600 memcpy(&global_settings.resume_first_index, &config_block[0xF4], 4);
597 memcpy(&global_settings.resume_seed, &config_block[0xF8], 4); 601 memcpy(&global_settings.resume_seed, &config_block[0xF8], 4);
598 602
@@ -783,6 +787,7 @@ void settings_reset(void) {
783 global_settings.resume_index = -1; 787 global_settings.resume_index = -1;
784 global_settings.resume_offset = -1; 788 global_settings.resume_offset = -1;
785 global_settings.disk_spindown = 5; 789 global_settings.disk_spindown = 5;
790 global_settings.disk_poweroff = false;
786 global_settings.browse_current = false; 791 global_settings.browse_current = false;
787 global_settings.play_selected = true; 792 global_settings.play_selected = true;
788 global_settings.peak_meter_release = 8; 793 global_settings.peak_meter_release = 8;