From 4f1657ab2c60079de6825763f749ec7a58dcd700 Mon Sep 17 00:00:00 2001 From: Pk11 Date: Fri, 14 Jan 2022 10:35:42 -0600 Subject: [PATCH] Show file errors before asking to install --- arm9/src/install.c | 26 +++++++++++++------------- arm9/src/titlemenu.c | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/arm9/src/install.c b/arm9/src/install.c index 5e4e4e2..0933bd3 100644 --- a/arm9/src/install.c +++ b/arm9/src/install.c @@ -361,19 +361,6 @@ bool install(char* fpath, bool systemTitle) return false; } - //confirmation message - { - char str[] = "Are you sure you want to install\n"; - char* msg = (char*)malloc(strlen(str) + strlen(fpath) + 8); - sprintf(msg, "%s%s\n", str, fpath); - - bool choice = choiceBox(msg); - free(msg); - - if (choice == NO) - return false; - } - //start installation clearScreen(&bottomScreen); @@ -422,6 +409,19 @@ bool install(char* fpath, bool systemTitle) goto error; } + //confirmation message + { + char str[] = "Are you sure you want to install\n"; + char* msg = (char*)malloc(strlen(str) + strlen(fpath) + 8); + sprintf(msg, "%s%s\n", str, fpath); + + bool choice = choiceBox(msg); + free(msg); + + if (choice == NO) + return false; + } + if (!sdnandMode && !nandio_unlock_writing()) return false; diff --git a/arm9/src/titlemenu.c b/arm9/src/titlemenu.c index 9b9211d..e71134e 100644 --- a/arm9/src/titlemenu.c +++ b/arm9/src/titlemenu.c @@ -355,7 +355,6 @@ static bool delete(Menu* m) { char dirPath[64]; sprintf(dirPath, "%.*s", sdnandMode ? 27 : 29, fpath); - nocashMessage(dirPath); if (!dirExists(dirPath)) {