all repos — mgba @ 3593aa7b8174d12ecd426a1e69f7ffbe411a04a9

mGBA Game Boy Advance Emulator

GB: Halting should do nothing if an IRQ is already pending
Jeffrey Pfau jeffrey@endrift.com
Sat, 27 Aug 2016 01:54:30 -0700
commit

3593aa7b8174d12ecd426a1e69f7ffbe411a04a9

parent

4998c667d47bacc0c2a221d777aad29a1a8c7062

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M src/gb/gb.csrc/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) {