diff --git a/source/arm11/open_agb_firm.c b/source/arm11/open_agb_firm.c index 7a7cd04..22c3706 100644 --- a/source/arm11/open_agb_firm.c +++ b/source/arm11/open_agb_firm.c @@ -345,16 +345,16 @@ static u16 detectSaveType(u32 romSize) { const u32 *romPtr = (u32*)ROM_LOC; u16 saveType; + if( g_oafConfig.savePolicy == SAVE_POLICY_SRAM ) + { + return SAVE_TYPE_SRAM_256k; + } if((saveType = checkSaveOverride(romPtr[0xAC / 4])) != 0xFF) { debug_printf("Serial in override list.\n" "saveType: %u\n", saveType); return saveType; } - if( g_oafConfig.savePolicy == SAVE_POLICY_SRAM ) - { - return SAVE_TYPE_SRAM_256k; - } // Code based on: https://github.com/Gericom/GBARunner2/blob/master/arm9/source/save/Save.vram.cpp romPtr += 0xE4 / 4; // Skip headers. @@ -856,6 +856,9 @@ Result oafInitAndRun(void) // Adjust the path for the save file and get save type. gameCfg2SavePath(filePath, g_oafConfig.saveSlot); u16 saveType; + if( g_oafConfig.savePolicy == SAVE_POLICY_POPUP ) + g_oafConfig.saveOverride = true; + else g_oafConfig.saveOverride = g_oafConfig.useGbaDb = false; if(g_oafConfig.useGbaDb || g_oafConfig.saveOverride) saveType = getSaveType(romSize, filePath); else