mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 15:19:53 -06:00
SD/MMC: don't assume space/data is available when a SD read/write command is issued. fixes bug where unlaunch would corrupt the NAND when saving settings.
this finally fixes #956 I guess
This commit is contained in:
@ -855,8 +855,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
|
|||||||
}
|
}
|
||||||
RWCommand = 18;
|
RWCommand = 18;
|
||||||
Host->SendResponse(CSR, true);
|
Host->SendResponse(CSR, true);
|
||||||
ReadBlock(RWAddress);
|
RWAddress += ReadBlock(RWAddress);
|
||||||
RWAddress += BlockSize;
|
|
||||||
SetState(0x05);
|
SetState(0x05);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -870,8 +869,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param)
|
|||||||
}
|
}
|
||||||
RWCommand = 25;
|
RWCommand = 25;
|
||||||
Host->SendResponse(CSR, true);
|
Host->SendResponse(CSR, true);
|
||||||
WriteBlock(RWAddress);
|
RWAddress += WriteBlock(RWAddress);
|
||||||
RWAddress += BlockSize;
|
|
||||||
SetState(0x04);
|
SetState(0x04);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user