GBA Savedata: Fix loading savestates with 512Mb Flash saves
Jeffrey Pfau jeffrey@endrift.com
Sun, 25 Sep 2016 13:39:08 -0700
1 files changed,
2 insertions(+),
3 deletions(-)
jump to
M
src/gba/savedata.c
→
src/gba/savedata.c
@@ -230,10 +230,9 @@ savedata->data = anonymousMemoryMap(SIZE_CART_FLASH1M);
} 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;