diff --git a/nyx/nyx_gui/config.c b/nyx/nyx_gui/config.c index 0191ecd..b70d437 100644 --- a/nyx/nyx_gui/config.c +++ b/nyx/nyx_gui/config.c @@ -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; } diff --git a/nyx/nyx_gui/frontend/gui.c b/nyx/nyx_gui/frontend/gui.c index 6d8604b..6dd4506 100644 --- a/nyx/nyx_gui/frontend/gui.c +++ b/nyx/nyx_gui/frontend/gui.c @@ -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; }