mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Improved progress indicator for drive CMAC fixer
This commit is contained in:
parent
3310400e1f
commit
40598423da
@ -74,7 +74,7 @@ GodMode9 provides access to system data via drives, a listing of what each drive
|
|||||||
* __`T: TICKET.DB IMAGE`__: Ticket database files can be mounted and accessed via this drive. This provides easy and quick access to all tickets inside the `ticket.db`. This is read-only.
|
* __`T: TICKET.DB IMAGE`__: Ticket database files can be mounted and accessed via this drive. This provides easy and quick access to all tickets inside the `ticket.db`. This is read-only.
|
||||||
* __`M: MEMORY VIRTUAL`__: This provides access to various memory regions. This is protected by a special write permission, and caution is advised when doing modifications inside this drive. This drive also gives access to `boot9.bin`, `boot11.bin` (boot9strap only) and `otp.mem` (sighaxed systems only).
|
* __`M: MEMORY VIRTUAL`__: This provides access to various memory regions. This is protected by a special write permission, and caution is advised when doing modifications inside this drive. This drive also gives access to `boot9.bin`, `boot11.bin` (boot9strap only) and `otp.mem` (sighaxed systems only).
|
||||||
* __`X: NAND XORPADS`__: This drive contains XORpads for all NAND partitions. XORpads can be used to decrypt NAND partitions outside of the 3DS console with the help of [additional software](https://github.com/d0k3/3DSFAT16tool/releases). This is read-only.
|
* __`X: NAND XORPADS`__: This drive contains XORpads for all NAND partitions. XORpads can be used to decrypt NAND partitions outside of the 3DS console with the help of [additional software](https://github.com/d0k3/3DSFAT16tool/releases). This is read-only.
|
||||||
* __`V: VRAM VIRTUAL`__: This drive resides in the first VRAM bank and contains files essential to GodMode9. The splash logo (in QLZ format) and the readme file are found there, as well as any file that is provided inside the `data` folder at build time. This is read-only.
|
* __`V: VRAM VIRTUAL`__: This drive resides in the first VRAM bank and contains files essential to GodMode9. The font (in PBM format), the splash logo (in PCX format) and the readme file are found there, as well as any file that is provided inside the `data` folder at build time. This is read-only.
|
||||||
* __`Z: LAST SEARCH`__: After a search operation, search results are found inside this drive. The drive can be accessed at a later point to return to the former search results.
|
* __`Z: LAST SEARCH`__: After a search operation, search results are found inside this drive. The drive can be accessed at a later point to return to the former search results.
|
||||||
|
|
||||||
|
|
||||||
|
@ -1976,7 +1976,6 @@ u32 GodMode(int entrypoint) {
|
|||||||
scroll = 0;
|
scroll = 0;
|
||||||
}
|
}
|
||||||
} else if (user_select == fixcmac) {
|
} else if (user_select == fixcmac) {
|
||||||
ShowString("%s\nFixing CMACs for drive...", namestr);
|
|
||||||
RecursiveFixFileCmac(curr_entry->path);
|
RecursiveFixFileCmac(curr_entry->path);
|
||||||
ClearScreenF(true, false, COLOR_STD_BG);
|
ClearScreenF(true, false, COLOR_STD_BG);
|
||||||
} else if (user_select == dirnfo) {
|
} else if (user_select == dirnfo) {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "sha.h"
|
#include "sha.h"
|
||||||
#include "aes.h"
|
#include "aes.h"
|
||||||
#include "vff.h"
|
#include "vff.h"
|
||||||
|
#include "ui.h" // for RecursiveFixFileCmac()
|
||||||
|
|
||||||
// CMAC types, see:
|
// CMAC types, see:
|
||||||
// https://3dbrew.org/wiki/Savegames#AES_CMAC_header
|
// https://3dbrew.org/wiki/Savegames#AES_CMAC_header
|
||||||
@ -281,9 +282,12 @@ u32 RecursiveFixFileCmacWorker(char* path) {
|
|||||||
DIR pdir;
|
DIR pdir;
|
||||||
|
|
||||||
if (fvx_opendir(&pdir, path) == FR_OK) { // process folder contents
|
if (fvx_opendir(&pdir, path) == FR_OK) { // process folder contents
|
||||||
|
char pathstr[32 + 1];
|
||||||
|
TruncateString(pathstr, path, 32, 8);
|
||||||
char* fname = path + strnlen(path, 255);
|
char* fname = path + strnlen(path, 255);
|
||||||
*(fname++) = '/';
|
*(fname++) = '/';
|
||||||
|
|
||||||
|
ShowString("%s\nFixing CMACs, please wait...", pathstr);
|
||||||
while (f_readdir(&pdir, &fno) == FR_OK) {
|
while (f_readdir(&pdir, &fno) == FR_OK) {
|
||||||
if ((strncmp(fno.fname, ".", 2) == 0) || (strncmp(fno.fname, "..", 3) == 0))
|
if ((strncmp(fno.fname, ".", 2) == 0) || (strncmp(fno.fname, "..", 3) == 0))
|
||||||
continue; // filter out virtual entries
|
continue; // filter out virtual entries
|
||||||
@ -294,6 +298,7 @@ u32 RecursiveFixFileCmacWorker(char* path) {
|
|||||||
if (RecursiveFixFileCmacWorker(path) != 0) return 1;
|
if (RecursiveFixFileCmacWorker(path) != 0) return 1;
|
||||||
} else if (CheckCmacPath(path) == 0) { // file, try to fix the CMAC
|
} else if (CheckCmacPath(path) == 0) { // file, try to fix the CMAC
|
||||||
if (FixFileCmac(path) != 0) return 1;
|
if (FixFileCmac(path) != 0) return 1;
|
||||||
|
ShowString("%s\nFixing CMACs, please wait...", pathstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f_closedir(&pdir);
|
f_closedir(&pdir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user