Plumb through filename for checking overrides
Jeffrey Pfau jeffrey@endrift.com
Thu, 17 Oct 2013 01:07:08 -0700
2 files changed,
4 insertions(+),
1 deletions(-)
M
src/gba/gba-thread.c
→
src/gba/gba-thread.c
@@ -56,8 +56,8 @@ strcpy(savedata, threadContext->fname);
strcat(savedata, "sav"); } } - GBALoadROM(&gba, threadContext->fd, threadContext->fname); gba.savefile = savedata; + GBALoadROM(&gba, threadContext->fd, threadContext->fname); } #ifdef USE_DEBUGGER
M
src/gba/gba.c
→
src/gba/gba.c
@@ -454,6 +454,9 @@ void _checkOverrides(struct GBA* gba, uint32_t id) {
int i; for (i = 0; _savedataOverrides[i].id; ++i) { if (_savedataOverrides[i].id == id) { + if (_savedataOverrides[i].type != SAVEDATA_NONE) { + GBASavedataInit(&gba->memory.savedata, gba->savefile); + } gba->memory.savedata.type = _savedataOverrides[i].type; switch (_savedataOverrides[i].type) { case SAVEDATA_FLASH512: