Fix mounting images on 3DS w/o an EmuNAND

This commit is contained in:
d0k3 2016-04-07 12:00:41 +02:00
parent b1732eb673
commit d5dea9415f
2 changed files with 6 additions and 4 deletions

View File

@ -134,12 +134,14 @@ DSTATUS disk_initialize (
return RES_PARERR;
} else if (pdrv < 4) {
nand_type_sys = CheckNandType(NAND_SYSNAND);
if (!nand_type_sys) return RES_PARERR;
} else if (pdrv < 7) {
nand_type_emu = CheckNandType(NAND_EMUNAND);
if (!nand_type_emu) return RES_PARERR;
} else if (pdrv < 10) {
if (!GetMountState())
return RES_PARERR;
if (!GetMountState()) return RES_PARERR;
nand_type_img = CheckNandType(NAND_IMGNAND);
if (!nand_type_img) return RES_PARERR;
}
return RES_OK;
}

View File

@ -35,7 +35,7 @@ bool InitExtFS() {
for (u32 i = 1; i < NORM_FS; i++) {
char fsname[8];
snprintf(fsname, 7, "%lu:", i);
if (f_mount(fs + i, fsname, 1) != FR_OK) return false;
if (f_mount(fs + i, fsname, 1) == FR_OK)
fs_mounted[i] = true;
}
return true;