mirror of https://github.com/mgba-emu/mgba.git
GBA: Add DMA timer check to savestate loading
This commit is contained in:
parent
9b66720955
commit
d2804505cb
1
CHANGES
1
CHANGES
|
@ -32,6 +32,7 @@ Misc:
|
|||
- Qt: Disable menu items in multiplayer that don't make sense to have enabled
|
||||
- Qt: Dropping multiplayer windows works more cleanly now
|
||||
- GBA BIOS: Implement RegisterRamReset for SIO registers
|
||||
- GBA: Additional savestate sanity checks
|
||||
|
||||
0.3.0: (2015-08-16)
|
||||
Features:
|
||||
|
|
|
@ -107,6 +107,10 @@ bool GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) {
|
|||
GBALog(gba, GBA_LOG_WARN, "Savestate is corrupted: timer nextEvent is negative");
|
||||
error = true;
|
||||
}
|
||||
if (state->dma[0].nextEvent < 0 || state->dma[1].nextEvent < 0 || state->dma[2].nextEvent < 0 || state->dma[3].nextEvent < 0) {
|
||||
GBALog(gba, GBA_LOG_WARN, "Savestate is corrupted: DMA nextEvent is negative");
|
||||
error = true;
|
||||
}
|
||||
if (state->audio.eventDiff < 0) {
|
||||
GBALog(gba, GBA_LOG_WARN, "Savestate is corrupted: audio eventDiff is negative");
|
||||
error = true;
|
||||
|
|
Loading…
Reference in New Issue