mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Show helpful hints when decryption / injecting H&S fails
This commit is contained in:
parent
96d70aaa01
commit
41a25cee16
@ -898,6 +898,8 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
||||
if (!(filetype & BIN_KEYDB) && (CryptGameFile(path, inplace, false) == 0)) n_success++;
|
||||
else if ((filetype & BIN_KEYDB) && (CryptAesKeyDb(path, inplace, false) == 0)) n_success++;
|
||||
else { // on failure: set cursor on failed title, break;
|
||||
TruncateString(pathstr, path, 32, 8);
|
||||
ShowPrompt(false, "%s\nDecryption failed%s", pathstr, (filetype & (GAME_NCCH|GAME_NCSD|GAME_CIA)) ? "\n\nHint: Did you provide\n" KEYDB_NAME " & " SEEDDB_NAME"?" : "");
|
||||
*cursor = i;
|
||||
break;
|
||||
}
|
||||
@ -913,7 +915,8 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
||||
} else {
|
||||
u32 ret = (filetype & BIN_KEYDB) ? CryptAesKeyDb(curr_entry->path, inplace, false) :
|
||||
CryptGameFile(curr_entry->path, inplace, false);
|
||||
if (inplace || (ret != 0)) ShowPrompt(false, "%s\nDecryption %s", pathstr, (ret == 0) ? "success" : "failed");
|
||||
if (inplace || (ret != 0)) ShowPrompt(false, "%s\nDecryption %s", pathstr, (ret == 0) ? "success" : (filetype & (GAME_NCCH|GAME_NCSD|GAME_CIA)) ?
|
||||
"failed\n\nHint: Did you provide\n" KEYDB_NAME " & " SEEDDB_NAME"?" : "failed");
|
||||
else ShowPrompt(false, "%s\nDecrypted to %s", pathstr, OUTPUT_PATH);
|
||||
}
|
||||
}
|
||||
@ -943,6 +946,8 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
||||
if (!(filetype & BIN_KEYDB) && (CryptGameFile(path, inplace, true) == 0)) n_success++;
|
||||
else if ((filetype & BIN_KEYDB) && (CryptAesKeyDb(path, inplace, true) == 0)) n_success++;
|
||||
else { // on failure: set cursor on failed title, break;
|
||||
TruncateString(pathstr, path, 32, 8);
|
||||
ShowPrompt(false, "%s\nEncryption failed", pathstr);
|
||||
*cursor = i;
|
||||
break;
|
||||
}
|
||||
@ -975,6 +980,8 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
||||
current_dir->entry[i].marked = false;
|
||||
if (BuildCiaFromGameFile(path, force_legit) == 0) n_success++;
|
||||
else { // on failure: set *cursor on failed title, break;
|
||||
TruncateString(pathstr, path, 32, 8);
|
||||
ShowPrompt(false, "%s\nBuild CIA failed", pathstr);
|
||||
*cursor = i;
|
||||
break;
|
||||
}
|
||||
@ -1011,6 +1018,8 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
||||
if (ValidateNandDump(path) == 0) n_success++;
|
||||
} else if (VerifyGameFile(path) == 0) n_success++;
|
||||
else { // on failure: set *cursor on failed title, break;
|
||||
TruncateString(pathstr, path, 32, 8);
|
||||
ShowPrompt(false, "%s\nVerification failed", pathstr);
|
||||
*cursor = i;
|
||||
break;
|
||||
}
|
||||
@ -1098,7 +1107,7 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
||||
user_select = (n_opt > 1) ? (int) ShowSelectPrompt(n_opt, optionstr, pathstr) : n_opt;
|
||||
if (user_select) {
|
||||
ShowPrompt(false, "%s\nH&S inject %s", pathstr,
|
||||
(InjectHealthAndSafety(curr_entry->path, destdrv[user_select-1]) == 0) ? "success" : "failed");
|
||||
(InjectHealthAndSafety(curr_entry->path, destdrv[user_select-1]) == 0) ? "success" : "failed\n\nHint: Did you provide\n" KEYDB_NAME "?");
|
||||
}
|
||||
return 0;
|
||||
} else if (user_select == ctrtransfer) { // -> transfer CTRNAND image to SysNAND
|
||||
|
Loading…
x
Reference in New Issue
Block a user