From 0eb576cfc5cb3b188d56c4c759b8627d003a881d Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Mon, 17 Oct 2022 19:24:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=87=A0=E7=A7=8D=E5=AD=98?= =?UTF-8?q?=E6=A1=A3=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/open_agb_firm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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