diff --git a/src/gameboy/ppu.rs b/src/gameboy/ppu.rs index e89851a..2363c14 100644 --- a/src/gameboy/ppu.rs +++ b/src/gameboy/ppu.rs @@ -164,6 +164,8 @@ impl Ppu { if (self.stat >> 6) & 0b1 == 1 { interrupts.write_if_lcd_stat(true); } + } else { + self.stat &= !(1 << 2); } } diff --git a/src/window.rs b/src/window.rs index 4b3d8b4..8ef423f 100644 --- a/src/window.rs +++ b/src/window.rs @@ -51,7 +51,7 @@ pub const FB_HEIGHT: u32 = 144; pub const FB_WIDTH: u32 = 160; #[derive(Debug, Default)] -pub struct Keymap { +struct Keymap { pub down: bool, pub up: bool, pub left: bool,