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,9 +372,11 @@ void GBSetInterrupts(struct LR35902Core* cpu, bool enable) {
}
void GBHalt(struct LR35902Core* cpu) {
if (!cpu->irqPending) {
cpu->cycles = cpu->nextEvent;
cpu->halted = true;
}
}
void GBStop(struct LR35902Core* cpu) {
struct GB* gb = (struct GB*) cpu->master;