mirror of https://github.com/mgba-emu/mgba.git
GBA Savedata: Fix EEPROM writing codepath when savetype is not EEPROM
This commit is contained in:
parent
27feb3ed1f
commit
00cbb6156b
1
CHANGES
1
CHANGES
|
@ -136,6 +136,7 @@ Bugfixes:
|
|||
- Qt: Fix mapping analog triggers (fixes mgba.io/i/495)
|
||||
- Qt: Grab focus when game starts (fixes mgba.io/i/804)
|
||||
- Core: Remember to deinit proxy ring FIFO
|
||||
- GBA Savedata: Fix EEPROM writing codepath when savetype is not EEPROM
|
||||
Misc:
|
||||
- mGUI: Add SGB border configuration option
|
||||
- mGUI: Add support for different settings types
|
||||
|
|
|
@ -278,7 +278,9 @@ void GBADMAService(struct GBA* gba, int number, struct GBADMA* info) {
|
|||
mLOG(GBA_MEM, INFO, "Detected EEPROM savegame");
|
||||
GBASavedataInitEEPROM(&memory->savedata);
|
||||
}
|
||||
GBASavedataWriteEEPROM(&memory->savedata, memory->dmaTransferRegister, wordsRemaining);
|
||||
if (memory->savedata.type == SAVEDATA_EEPROM512 || memory->savedata.type == SAVEDATA_EEPROM) {
|
||||
GBASavedataWriteEEPROM(&memory->savedata, memory->dmaTransferRegister, wordsRemaining);
|
||||
}
|
||||
} else {
|
||||
cpu->memory.store16(cpu, dest, memory->dmaTransferRegister, 0);
|
||||
|
||||
|
|
|
@ -892,7 +892,11 @@ void GBAStore16(struct ARMCore* cpu, uint32_t address, int16_t value, int* cycle
|
|||
mLOG(GBA_MEM, INFO, "Detected EEPROM savegame");
|
||||
GBASavedataInitEEPROM(&memory->savedata);
|
||||
}
|
||||
GBASavedataWriteEEPROM(&memory->savedata, value, 1);
|
||||
if (memory->savedata.type == SAVEDATA_EEPROM512 || memory->savedata.type == SAVEDATA_EEPROM) {
|
||||
GBASavedataWriteEEPROM(&memory->savedata, value, 1);
|
||||
break;
|
||||
}
|
||||
mLOG(GBA_MEM, GAME_ERROR, "Bad memory Store16: 0x%08X", address);
|
||||
break;
|
||||
case REGION_CART_SRAM:
|
||||
case REGION_CART_SRAM_MIRROR:
|
||||
|
|
Loading…
Reference in New Issue