mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Fix and improve CMAC calculation dialogue
This commit is contained in:
parent
2d9dabdd0e
commit
6cf3117bc3
@ -671,10 +671,10 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
|||||||
GetDirContents(current_dir, current_path);
|
GetDirContents(current_dir, current_path);
|
||||||
return 0;
|
return 0;
|
||||||
} else if (user_select == calccmac) { // -> calculate CMAC
|
} else if (user_select == calccmac) { // -> calculate CMAC
|
||||||
optionstr[0] = "Check only current CMAC";
|
optionstr[0] = "Check current CMAC only";
|
||||||
optionstr[1] = "Verify CMAC for all files";
|
optionstr[1] = "Verify CMAC for all";
|
||||||
optionstr[2] = "Fix CMAC for all files";
|
optionstr[2] = "Fix CMAC for all";
|
||||||
user_select = (n_marked > 1) ? ShowSelectPrompt(3, optionstr, "%s\n%(lu files selected)", pathstr, n_marked) : 1;
|
user_select = (n_marked > 1) ? ShowSelectPrompt(3, optionstr, "%s\n%(%lu files selected)", pathstr, n_marked) : 1;
|
||||||
if (user_select == 1) {
|
if (user_select == 1) {
|
||||||
CmacCalculator(curr_entry->path);
|
CmacCalculator(curr_entry->path);
|
||||||
return 0;
|
return 0;
|
||||||
@ -692,13 +692,13 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, DirStruct* cur
|
|||||||
n_nocmac++;
|
n_nocmac++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
current_dir->entry[i].marked = false;
|
if (CheckFileCmac(path) == 0) n_success++;
|
||||||
else if (fix && (FixFileCmac(path) == 0)) n_fixed++;
|
else if (fix && (FixFileCmac(path) == 0)) n_fixed++;
|
||||||
else { // on failure: set cursor on failed file
|
else { // on failure: set cursor on failed file
|
||||||
*cursor = i;
|
*cursor = i;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (CheckFileCmac(path) == 0) n_success++;
|
current_dir->entry[i].marked = false;
|
||||||
}
|
}
|
||||||
if (n_fixed) {
|
if (n_fixed) {
|
||||||
if (n_nocmac) ShowPrompt(false, "%lu/%lu/%lu files ok/fixed/total\n%lu/%lu have no CMAC",
|
if (n_nocmac) ShowPrompt(false, "%lu/%lu/%lu files ok/fixed/total\n%lu/%lu have no CMAC",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user