From 7c9bff61f606ec0b170bb0fa60b735a63688653f Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Sun, 4 Apr 2021 01:50:49 -0500 Subject: [PATCH] fix(ppu): add missing check for enabled interrupt --- src/ppu.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ppu.rs b/src/ppu.rs index edb5e0f..f842fd8 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -102,8 +102,13 @@ impl Ppu { self.pos.line_y += 1; if self.pos.line_y == 154 { - self.stat.set_mode(Mode::OamScan); self.pos.line_y = 0; + + if self.stat.oam_int() { + self.interrupt.set_lcd_stat(true); + } + + self.stat.set_mode(Mode::OamScan); } if self.stat.coincidence_int() {