GBA: Only use eepromReset/flashReset during reset event (CPUReset)

This commit is contained in:
retro-wertz 2019-01-11 01:12:40 +08:00 committed by Rafael Kitover
parent 0d73da01a1
commit c2b31635dd
1 changed files with 2 additions and 2 deletions

View File

@ -3351,7 +3351,6 @@ void SetSaveType(int st)
cpuSaveGameFunc = flashSaveDecide;
break;
case 1: // EEPROM
eepromReset();
cpuSramEnabled = false;
cpuFlashEnabled = false;
cpuEEPROMEnabled = true;
@ -3368,7 +3367,6 @@ void SetSaveType(int st)
gbaSaveType = 1;
break;
case 3: // FLASH
flashReset();
cpuSramEnabled = false;
cpuFlashEnabled = true;
cpuEEPROMEnabled = false;
@ -3633,6 +3631,8 @@ void CPUReset()
BIOS_RegisterRamReset(0xfe);
}
flashReset();
eepromReset();
SetSaveType(saveType);
ARM_PREFETCH;