From 7ca8bd1a7c994cd4a8bd30cd40142515f590a2ce Mon Sep 17 00:00:00 2001 From: Pk11 Date: Sat, 11 Mar 2023 20:29:22 -0600 Subject: [PATCH] Offer to fix FAT copy mismatch when Unlaunch not found - Fixes #1 --- arm9/src/main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/arm9/src/main.c b/arm9/src/main.c index 179be76..c64229a 100644 --- a/arm9/src/main.c +++ b/arm9/src/main.c @@ -199,10 +199,18 @@ int main(int argc, char **argv) } } - if (!unlaunchFound) { - messageBox("Unlaunch not found, please\ninstall it.\n\n\x1B[46mhttps://dsi.cfw.guide/\x1B[47m"); - return 0; - } else if (!unlaunchPatches) { + if (!unlaunchFound) + { + if (choiceBox("Unlaunch not found, please\ninstall it.\n\n\x1B[46mhttps://dsi.cfw.guide/\x1B[47m\n\nFix FAT copy mismatch?") == YES && nandio_unlock_writing()) + { + nandio_force_fat_fix(); + nandio_lock_writing(); + messageBox("Mismatch in FAT copies will be\nfixed now.\n"); + } + programEnd = true; + } + else if (!unlaunchPatches) + { messageBox("Unlaunch's Launcher Patches are\nnot enabled. You will need to\nprovide TMD files or reinstall.\n\n\x1B[46mhttps://dsi.cfw.guide/\x1B[47m"); } }