GB: Halting should do nothing if an IRQ is already pending
Jeffrey Pfau jeffrey@endrift.com
Sat, 27 Aug 2016 01:54:30 -0700
1 files changed,
4 insertions(+),
2 deletions(-)
jump to
M
src/gb/gb.c
→
src/gb/gb.c
@@ -372,8 +372,10 @@ }
} void GBHalt(struct LR35902Core* cpu) { - cpu->cycles = cpu->nextEvent; - cpu->halted = true; + if (!cpu->irqPending) { + cpu->cycles = cpu->nextEvent; + cpu->halted = true; + } } void GBStop(struct LR35902Core* cpu) {