mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Fix: Mounting public.sav files
This commit is contained in:
parent
8e4b04a18e
commit
da506d3c4a
@ -2925,6 +2925,7 @@ BYTE check_fs ( /* 0:FAT, 1:exFAT, 2:Valid BS but not FAT, 3:Not a BS, 4:Disk er
|
||||
if (fs->win[BS_JmpBoot] == 0xE9 || (fs->win[BS_JmpBoot] == 0xEB && fs->win[BS_JmpBoot + 2] == 0x90)) {
|
||||
if ((ld_dword(fs->win + BS_FilSysType) & 0xFFFFFF) == 0x544146) return 0; /* Check "FAT" string */
|
||||
if (ld_dword(fs->win + BS_FilSysType32) == 0x33544146) return 0; /* Check "FAT3" string */
|
||||
if (ld_dword(fs->win + BS_FilSysType) == 0x00000000) return 0; /* all zeroes, hacked(!!!) in */
|
||||
}
|
||||
#if _FS_EXFAT
|
||||
if (!mem_cmp(fs->win + BS_JmpBoot, "\xEB\x76\x90" "EXFAT ", 11)) return 1;
|
||||
|
@ -24,7 +24,7 @@ u32 IdentifyFileType(const char* path) {
|
||||
} else if (getbe16(header + 0x1FE) == 0x55AA) { // migt be FAT or MBR
|
||||
if ((strncmp((char*) header + 0x36, "FAT12 ", 8) == 0) || (strncmp((char*) header + 0x36, "FAT16 ", 8) == 0) ||
|
||||
(strncmp((char*) header + 0x36, "FAT ", 8) == 0) || (strncmp((char*) header + 0x52, "FAT32 ", 8) == 0) ||
|
||||
((getle64(header + 0x36) == 0) && (getle16(header + 0x0B) == 0x20))) { // last one is a special case for public.sav
|
||||
((getle64(header + 0x36) == 0) && (getle16(header + 0x0B) == 0x200))) { // last one is a special case for public.sav
|
||||
return IMG_FAT; // this is an actual FAT header
|
||||
} else if (((getle32(header + 0x1BE + 0x8) + getle32(header + 0x1BE + 0xC)) < (fsize / 0x200)) && // check file size
|
||||
(getle32(header + 0x1BE + 0x8) > 0) && (getle32(header + 0x1BE + 0xC) >= 0x800) && // check first partition sanity
|
||||
|
Loading…
x
Reference in New Issue
Block a user