Fix bank switch detection
Jeffrey Pfau jeffrey@endrift.com
Wed, 25 Sep 2013 04:48:27 -0700
1 files changed,
2 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba-savedata.c
→
src/gba/gba-savedata.c
@@ -137,6 +137,7 @@ } else {
GBALog(0, GBA_LOG_GAME_ERROR, "Bad flash bank switch"); savedata->command = FLASH_COMMAND_NONE; } + savedata->command = FLASH_COMMAND_NONE; break; default: if (address == FLASH_BASE_HI && value == FLASH_COMMAND_START) {@@ -275,6 +276,7 @@ void _flashSwitchBank(struct GBASavedata* savedata, int bank) {
savedata->currentBank = &savedata->data[bank << 16]; if (bank > 0) { savedata->type = SAVEDATA_FLASH1M; + ftruncate(savedata->fd, SIZE_CART_FLASH1M); } }