mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-27 21:19:20 +00:00
nyx: fix first time config save unmounting
SD card should not get unmounted on the first boot without hekate_ipl.ini. Move sd card mounting management outside of it.
This commit is contained in:
parent
b142ca0f33
commit
f35c5b0596
@ -64,9 +64,6 @@ void set_nyx_default_configuration()
|
||||
|
||||
int create_config_entry()
|
||||
{
|
||||
if (!sd_mount())
|
||||
return 1;
|
||||
|
||||
char lbuf[64];
|
||||
FIL fp;
|
||||
bool mainIniFound = false;
|
||||
@ -184,7 +181,6 @@ int create_config_entry()
|
||||
}
|
||||
|
||||
f_close(&fp);
|
||||
sd_unmount();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2073,7 +2073,10 @@ static lv_res_t _save_options_action(lv_obj_t *btn)
|
||||
lv_obj_t * mbox = lv_mbox_create(lv_scr_act(), NULL);
|
||||
lv_mbox_set_recolor_text(mbox, true);
|
||||
|
||||
int res = !create_config_entry();
|
||||
int res = 0;
|
||||
|
||||
if (sd_mount())
|
||||
res = create_config_entry();
|
||||
|
||||
if (res)
|
||||
lv_mbox_set_text(mbox, "#FF8000 hekate Configuration#\n\n#96FF00 The configuration was saved to sd card!#");
|
||||
@ -2084,6 +2087,8 @@ static lv_res_t _save_options_action(lv_obj_t *btn)
|
||||
|
||||
nyx_options_clear_ini_changes_made();
|
||||
|
||||
sd_unmount();
|
||||
|
||||
return LV_RES_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user