diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-03-15 17:12:40 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-06-20 18:57:25 -0400 |
commit | ed37c2e8948960b45c9bac58f1ffb678fdf31f5d (patch) | |
tree | 8eeda559c74a45e21eb112e75fcd7e62c788a18e /apps/main.c | |
parent | 58bf7c7e6fc9d94cbf1dacf3bd6b889fc4844895 (diff) | |
download | rockbox-ed37c2e8948960b45c9bac58f1ffb678fdf31f5d.tar.gz rockbox-ed37c2e8948960b45c9bac58f1ffb678fdf31f5d.zip |
FS#13193 - Add option to disable settings reset on startup
Updated version of the patch originally by user cockroach
UNTESTED
Ipods?, Iriver H10,
I do not own these players so YMMV
https://www.rockbox.org/tracker/task/13193
Change-Id: I7924837f582cc5c49ee68c186d6822f577f65147
Diffstat (limited to 'apps/main.c')
-rw-r--r-- | apps/main.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/main.c b/apps/main.c index dff9dc5778..d52c17a67e 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -566,7 +566,12 @@ static void init(void) | |||
566 | pcm_init(); | 566 | pcm_init(); |
567 | dsp_init(); | 567 | dsp_init(); |
568 | 568 | ||
569 | #if defined(SETTINGS_RESET) || (CONFIG_KEYPAD == IPOD_4G_PAD) || \ | 569 | CHART(">settings_load(ALL)"); |
570 | settings_load(SETTINGS_ALL); | ||
571 | CHART("<settings_load(ALL)"); | ||
572 | |||
573 | #if defined(SETTINGS_RESET) || \ | ||
574 | (CONFIG_KEYPAD == IPOD_4G_PAD) || \ | ||
570 | (CONFIG_KEYPAD == IRIVER_H10_PAD) | 575 | (CONFIG_KEYPAD == IRIVER_H10_PAD) |
571 | #ifdef SETTINGS_RESET | 576 | #ifdef SETTINGS_RESET |
572 | /* Reset settings if holding the reset button. (Rec on Archos, | 577 | /* Reset settings if holding the reset button. (Rec on Archos, |
@@ -577,16 +582,13 @@ static void init(void) | |||
577 | if (button_hold()) | 582 | if (button_hold()) |
578 | #endif | 583 | #endif |
579 | { | 584 | { |
580 | splash(HZ*2, str(LANG_RESET_DONE_CLEAR)); | 585 | if (global_settings.clear_settings_on_hold) |
581 | settings_reset(); | 586 | { |
587 | splash(HZ*2, str(LANG_RESET_DONE_CLEAR)); | ||
588 | settings_reset(); | ||
589 | } | ||
582 | } | 590 | } |
583 | else | ||
584 | #endif | 591 | #endif |
585 | { | ||
586 | CHART(">settings_load(ALL)"); | ||
587 | settings_load(SETTINGS_ALL); | ||
588 | CHART("<settings_load(ALL)"); | ||
589 | } | ||
590 | 592 | ||
591 | #ifdef HAVE_DIRCACHE | 593 | #ifdef HAVE_DIRCACHE |
592 | CHART(">init_dircache(true)"); | 594 | CHART(">init_dircache(true)"); |