all repos — mgba @ 62d941a979255f695da2a073813ad05f70df2ec8

mGBA Game Boy Advance Emulator

Plumb through filename for checking overrides
Jeffrey Pfau jeffrey@endrift.com
Thu, 17 Oct 2013 01:07:08 -0700
commit

62d941a979255f695da2a073813ad05f70df2ec8

parent

451c16f4cb00ebb8f03d7fad4fa7b7d46bc60fe5

2 files changed, 4 insertions(+), 1 deletions(-)

jump to
M src/gba/gba-thread.csrc/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.csrc/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: