Plumb through filename for checking overrides

This commit is contained in:
Jeffrey Pfau 2013-10-17 01:07:08 -07:00
parent 451c16f4cb
commit 62d941a979
2 changed files with 4 additions and 1 deletions

View File

@ -56,8 +56,8 @@ static void* _GBAThreadRun(void* context) {
strcat(savedata, "sav");
}
}
GBALoadROM(&gba, threadContext->fd, threadContext->fname);
gba.savefile = savedata;
GBALoadROM(&gba, threadContext->fd, threadContext->fname);
}
#ifdef USE_DEBUGGER

View File

@ -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: