nyx: Allow fix hybrid mbr tool to always run

This commit is contained in:
CTCaer 2021-02-06 04:10:50 +02:00
parent 8ccc47dfa5
commit a25c82a8ce
2 changed files with 7 additions and 1 deletions

View file

@ -2017,7 +2017,8 @@ static lv_res_t _action_fix_mbr(lv_obj_t *btn)
lv_obj_t *lbl_status = lv_label_create(mbox, NULL); lv_obj_t *lbl_status = lv_label_create(mbox, NULL);
lv_label_set_recolor(lbl_status, true); lv_label_set_recolor(lbl_status, true);
if (!sd_mount()) // Try to init sd card. No need for valid MBR.
if (!sd_mount() && !sd_get_card_initialized())
{ {
lv_label_set_text(lbl_status, "#FFDD00 Failed to init SD!#"); lv_label_set_text(lbl_status, "#FFDD00 Failed to init SD!#");
goto out; goto out;

View file

@ -60,6 +60,11 @@ bool sd_get_card_removed()
return false; return false;
} }
bool sd_get_card_initialized()
{
return sd_init_done;
}
u32 sd_get_mode() u32 sd_get_mode()
{ {
return sd_mode; return sd_mode;