GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
Vicki Pfau vi@endrift.com
Fri, 12 Oct 2018 11:13:55 -0700
2 files changed,
4 insertions(+),
0 deletions(-)
M
src/gba/savedata.c
→
src/gba/savedata.c
@@ -259,6 +259,9 @@ } else {
end = savedata->vf->size(savedata->vf); if (end < flashSize) { savedata->vf->truncate(savedata->vf, flashSize); + } else if (end >= SIZE_CART_FLASH1M) { + flashSize = SIZE_CART_FLASH1M; + savedata->type = SAVEDATA_FLASH1M; } savedata->data = savedata->vf->map(savedata->vf, flashSize, savedata->mapMode); }