GB: Halting should do nothing if an IRQ is already pending

This commit is contained in:
Jeffrey Pfau 2016-08-27 01:54:30 -07:00
parent 4998c667d4
commit 3593aa7b81
1 changed files with 4 additions and 2 deletions

View File

@ -372,8 +372,10 @@ void GBSetInterrupts(struct LR35902Core* cpu, bool enable) {
} }
void GBHalt(struct LR35902Core* cpu) { void GBHalt(struct LR35902Core* cpu) {
cpu->cycles = cpu->nextEvent; if (!cpu->irqPending) {
cpu->halted = true; cpu->cycles = cpu->nextEvent;
cpu->halted = true;
}
} }
void GBStop(struct LR35902Core* cpu) { void GBStop(struct LR35902Core* cpu) {