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