mirror of https://github.com/mgba-emu/mgba.git
GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
This commit is contained in:
parent
50d735b99b
commit
830cad3e7b
1
CHANGES
1
CHANGES
|
@ -3,6 +3,7 @@ Bugfixes:
|
|||
- GBA: All IRQs have 7 cycle delay (fixes mgba.io/i/539, mgba.io/i/1208)
|
||||
Misc:
|
||||
- GBA Savedata: EEPROM performance fixes
|
||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||
|
||||
0.7.0: (Future)
|
||||
Features:
|
||||
|
|
|
@ -259,6 +259,9 @@ void GBASavedataInitFlash(struct GBASavedata* savedata) {
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue