From 38ce46a158e1fb8a7fec269ef08046abf8c46d47 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Mon, 8 Feb 2021 03:52:23 +0200 Subject: [PATCH] nyx: Add more info while formatting emuMMC USER --- nyx/nyx_gui/frontend/fe_emummc_tools.c | 11 +++++++---- nyx/nyx_gui/frontend/gui_tools_partition_manager.c | 14 +++++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/nyx/nyx_gui/frontend/fe_emummc_tools.c b/nyx/nyx_gui/frontend/fe_emummc_tools.c index 1a09de0..b4c6f13 100644 --- a/nyx/nyx_gui/frontend/fe_emummc_tools.c +++ b/nyx/nyx_gui/frontend/fe_emummc_tools.c @@ -651,6 +651,8 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part if (resized_count) { + lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, "Done!\n"); + // Calculate USER size and set it for FatFS. u32 user_sectors = resized_count - user_offset - 33; disk_set_info(DRIVE_EMU, SET_SECTOR_COUNT, &user_sectors); @@ -662,7 +664,7 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part strcpy(user_part.name, "USER"); nx_emmc_bis_init(&user_part, true, sd_sector_off); - s_printf(gui->txt_buf, "\nFormatting USER...\n"); + s_printf(gui->txt_buf, "Formatting USER... \n"); lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf); manual_system_maintenance(true); @@ -676,17 +678,18 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part if (mkfs_error) { - s_printf(gui->txt_buf, "#FF0000 USER format failed (%d)...#\nPlease try again...\n", mkfs_error); + s_printf(gui->txt_buf, "#FF0000 Failed (%d)!#\nPlease try again...\n", mkfs_error); lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf); return 0; } + lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, "Done!\n"); // Flush BIS cache, deinit, clear BIS keys slots and reinstate SBK. nx_emmc_bis_end(); hos_bis_keys_clear(); - s_printf(gui->txt_buf, "Writing new GPT...\n"); + s_printf(gui->txt_buf, "Writing new GPT... "); lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf); manual_system_maintenance(true); @@ -706,7 +709,7 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part if (gpt_entry_idx >= gpt_main.header.num_part_ents) { - s_printf(gui->txt_buf, "#FF0000 No USER partition...#\nPlease try again...\n"); + s_printf(gui->txt_buf, "\n#FF0000 No USER partition...#\nPlease try again...\n"); lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf); return 0; diff --git a/nyx/nyx_gui/frontend/gui_tools_partition_manager.c b/nyx/nyx_gui/frontend/gui_tools_partition_manager.c index 50cd624..3d26bd8 100644 --- a/nyx/nyx_gui/frontend/gui_tools_partition_manager.c +++ b/nyx/nyx_gui/frontend/gui_tools_partition_manager.c @@ -1621,9 +1621,16 @@ static lv_res_t _create_mbox_partitioning_next(lv_obj_t *btn) s_printf(txt_buf, "#FFDD00 Warning: This will partition the SD Card!#\n\n"); if (part_info.backup_possible) - strcat(txt_buf, "#C7EA46 Your files will be backed up and restored!#\n#FFDD00Any other partition will be wiped!#"); + { + strcat(txt_buf, "#C7EA46 Your files will be backed up and restored!#\n" + "#FFDD00 Any other partition will be wiped!#"); + } else - strcat(txt_buf, "#FFDD00 Your files will be wiped!#\n#FFDD00 Use USB UMS to copy them over!#"); + { + strcat(txt_buf, "#FFDD00 Your files will be wiped!#\n" + "#FFDD00 Any other partition will be also wiped!#\n" + "#FFDD00 Use USB UMS to copy them over!#"); + } lv_label_set_text(lbl_status, txt_buf); @@ -1909,7 +1916,8 @@ static void create_mbox_check_files_total_size() else { lv_mbox_set_text(mbox, - "#FFDD00 The SD Card cannot be backed up!#\n\n" + "#FFDD00 The SD Card cannot be backed up!#\n" + "#FFDD00 Any other partition will be also wiped!#\n\n" "You will be asked to back up your files later via UMS."); }