mirror of https://github.com/mgba-emu/mgba.git
GBA Savedata: Fix loading savestates with 512Mb Flash saves
This commit is contained in:
parent
9c4de0e30c
commit
19d2f68a28
|
@ -230,10 +230,9 @@ void GBASavedataInitFlash(struct GBASavedata* savedata, bool realisticTiming) {
|
|||
} else {
|
||||
end = savedata->vf->size(savedata->vf);
|
||||
if (end < flashSize) {
|
||||
savedata->vf->truncate(savedata->vf, SIZE_CART_FLASH1M);
|
||||
flashSize = SIZE_CART_FLASH1M;
|
||||
savedata->vf->truncate(savedata->vf, flashSize);
|
||||
}
|
||||
savedata->data = savedata->vf->map(savedata->vf, SIZE_CART_FLASH1M, savedata->mapMode);
|
||||
savedata->data = savedata->vf->map(savedata->vf, flashSize, savedata->mapMode);
|
||||
}
|
||||
|
||||
savedata->currentBank = savedata->data;
|
||||
|
|
Loading…
Reference in New Issue