Clear panedata when unmounting SD card

... & check mount state when mounting image FATs
This commit is contained in:
d0k3 2016-04-06 17:12:22 +02:00
parent ec817ebb04
commit b1732eb673
2 changed files with 3 additions and 0 deletions

View File

@ -137,6 +137,8 @@ DSTATUS disk_initialize (
} else if (pdrv < 7) {
nand_type_emu = CheckNandType(NAND_EMUNAND);
} else if (pdrv < 10) {
if (!GetMountState())
return RES_PARERR;
nand_type_img = CheckNandType(NAND_IMGNAND);
}
return RES_OK;

View File

@ -265,6 +265,7 @@ u32 GodMode() {
DeinitExtFS();
DeinitSDCardFS();
clipboard->n_entries = 0;
memset(panedata, 0x00, N_PANES * sizeof(PaneData));
ShowPrompt(false, "SD card unmounted, you can eject now.\nPut it back in before you press <A>.");
while (!InitSDCardFS()) {
if (!ShowPrompt(true, "Reinitialising SD card failed! Retry?"))