forked from Mirror/GodMode9
parent
521fb25075
commit
7fb194caea
@ -322,6 +322,7 @@ u32 VerifyTmdContent(const char* path, u64 offset, TmdContentChunk* chunk, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 VerifyNcchFile(const char* path, u32 offset, u32 size) {
|
u32 VerifyNcchFile(const char* path, u32 offset, u32 size) {
|
||||||
|
static bool cryptofix_always = false;
|
||||||
bool cryptofix = false;
|
bool cryptofix = false;
|
||||||
NcchHeader ncch;
|
NcchHeader ncch;
|
||||||
NcchExtHeader exthdr;
|
NcchExtHeader exthdr;
|
||||||
@ -359,9 +360,15 @@ u32 VerifyNcchFile(const char* path, u32 offset, u32 size) {
|
|||||||
// disable crypto, try again
|
// disable crypto, try again
|
||||||
cryptofix = true;
|
cryptofix = true;
|
||||||
fvx_lseek(&file, offset);
|
fvx_lseek(&file, offset);
|
||||||
if ((GetNcchHeaders(&ncch, NULL, &exefs, &file, cryptofix) == 0) &&
|
if (GetNcchHeaders(&ncch, NULL, &exefs, &file, cryptofix) == 0) {
|
||||||
ShowPrompt(true, "%s\nError: Bad crypto flags\n \nAttempt to fix?", pathstr))
|
if (cryptofix_always) borkedflags = true;
|
||||||
borkedflags = true;
|
else {
|
||||||
|
const char* optionstr[3] = { "Attempt fix this time", "Attempt fix always", "Abort verification" };
|
||||||
|
u32 user_select = ShowSelectPrompt(3, optionstr, "%s\nError: Bad crypto flags", pathstr);
|
||||||
|
if ((user_select == 1) || (user_select == 2)) borkedflags = true;
|
||||||
|
if (user_select == 2) cryptofix_always = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!borkedflags) {
|
if (!borkedflags) {
|
||||||
if (!offset) ShowPrompt(false, "%s\nError: Bad ExeFS header", pathstr);
|
if (!offset) ShowPrompt(false, "%s\nError: Bad ExeFS header", pathstr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user