From 13c882411a03ce2adbd1492f7f4fef877b526c7f Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 29 May 2016 11:16:51 -0700 Subject: [PATCH] GB: Fix IRQs trampling each other if two happen mid-instruction --- src/gb/gb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gb/gb.c b/src/gb/gb.c index ac157f3ad..9d050867f 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -265,7 +265,7 @@ void GBUpdateIRQs(struct GB* gb) { } gb->cpu->halted = false; - if (!gb->memory.ime) { + if (!gb->memory.ime || gb->cpu->irqPending) { return; }