summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 74299356bd..fc72702b71 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -678,20 +678,30 @@ void settings_load(void)
678 global_settings.topruntime = 678 global_settings.topruntime =
679 config_block[0x28] | (config_block[0x29] << 8); 679 config_block[0x28] | (config_block[0x29] << 8);
680 680
681 global_settings.fade_on_stop = config_block[0xae] & 1; 681 if (config_block[0x29] != 0xae) {
682 global_settings.caption_backlight = (config_block[0xae] >> 1) & 1; 682 global_settings.fade_on_stop = config_block[0xae] & 1;
683 global_settings.caption_backlight = (config_block[0xae] >> 1) & 1;
684 }
683 685
684 global_settings.peak_meter_clip_hold = (config_block[0xb0]) & 0x1f; 686 if(config_block[0xb0] != 0xff) {
685 global_settings.peak_meter_performance = 687 global_settings.peak_meter_clip_hold = (config_block[0xb0]) & 0x1f;
686 (config_block[0xb0] & 0x80) != 0; 688 global_settings.peak_meter_performance =
689 (config_block[0xb0] & 0x80) != 0;
690 }
687 691
688 global_settings.peak_meter_release = config_block[0xb1] & 0x7f; 692 if(config_block[0xb1] != 0xff) {
689 global_settings.peak_meter_dbfs = (config_block[0xb1] & 0x80) != 0; 693 global_settings.peak_meter_release = config_block[0xb1] & 0x7f;
694 global_settings.peak_meter_dbfs = (config_block[0xb1] & 0x80) != 0;
695 }
690 696
691 global_settings.peak_meter_min = config_block[0xb2]; 697 if(config_block[0xb2] != 0xff)
692 global_settings.peak_meter_max = config_block[0xb3]; 698 global_settings.peak_meter_min = config_block[0xb2];
699
700 if(config_block[0xb3] != 0xff)
701 global_settings.peak_meter_max = config_block[0xb3];
693 702
694 global_settings.battery_capacity = config_block[0xb4]*50 + 1000; 703 if(config_block[0xb4] != 0xff)
704 global_settings.battery_capacity = config_block[0xb4]*50 + 1000;
695 705
696 if (config_block[0xb5] != 0xff) 706 if (config_block[0xb5] != 0xff)
697 global_settings.scroll_step = config_block[0xb5]; 707 global_settings.scroll_step = config_block[0xb5];
@@ -702,10 +712,7 @@ void settings_load(void)
702 if (config_block[0xb7] != 0xff) 712 if (config_block[0xb7] != 0xff)
703 global_settings.bidir_limit = config_block[0xb7]; 713 global_settings.bidir_limit = config_block[0xb7];
704 714
705 if (config_block[0xae] != 0xff) 715 if (config_block[0xac] != 0xff)
706 global_settings.fade_on_stop = config_block[0xae];
707
708 if (config_block[0xac] != 0xff)
709 global_settings.max_files_in_dir = 716 global_settings.max_files_in_dir =
710 config_block[0xac] | (config_block[0xad] << 8); 717 config_block[0xac] | (config_block[0xad] << 8);
711 718
@@ -1413,6 +1420,7 @@ void settings_reset(void) {
1413 global_settings.runtime = 0; 1420 global_settings.runtime = 0;
1414 global_settings.topruntime = 0; 1421 global_settings.topruntime = 0;
1415 global_settings.fade_on_stop = true; 1422 global_settings.fade_on_stop = true;
1423 global_settings.caption_backlight = false;
1416 global_settings.max_files_in_dir = 400; 1424 global_settings.max_files_in_dir = 400;
1417 global_settings.max_files_in_playlist = 10000; 1425 global_settings.max_files_in_playlist = 10000;
1418} 1426}