diff --git a/CHANGES b/CHANGES index 7491a984f..1c8edf672 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,7 @@ Bugfixes: - All: Fix fullscreen config option being ignored - GBA: Add savegame override for Crash Bandicoot 2 - ARM7: PSR mode bits should not get sign extended + - GBA: Only unhalt CPU if appropriate bit is set in IE Misc: - PSP2: Improved controller rumble - GB, GBA: Prevent loading null ROMs diff --git a/src/gba/gba.c b/src/gba/gba.c index 549de6ca2..704b93744 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -656,10 +656,12 @@ void GBAWriteIME(struct GBA* gba, uint16_t value) { void GBARaiseIRQ(struct GBA* gba, enum GBAIRQ irq) { gba->memory.io[REG_IF >> 1] |= 1 << irq; - gba->cpu->halted = 0; - if (gba->memory.io[REG_IME >> 1] && (gba->memory.io[REG_IE >> 1] & 1 << irq)) { - ARMRaiseIRQ(gba->cpu); + if (gba->memory.io[REG_IE >> 1] & 1 << irq) { + gba->cpu->halted = 0; + if (gba->memory.io[REG_IME >> 1]) { + ARMRaiseIRQ(gba->cpu); + } } }