From b89515a0c10895edc7fbf2c6a8441d2c3890fbdf Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Thu, 17 Jun 2021 18:48:04 -0500 Subject: [PATCH] fix(ppu): calculating window position is now signed This allows for the window to display properly in Link's Awakening --- src/ppu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ppu.rs b/src/ppu.rs index afb8af4..d3f6e23 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -320,7 +320,7 @@ impl Ppu { if self.ctrl.window_enabled() && !self.window_stat.should_draw() && self.window_stat.coincidence() - && self.x_pos >= self.pos.window_x - 7 + && self.x_pos as i16 >= self.pos.window_x as i16 - 7 { self.window_stat.set_should_draw(true); self.fetch.back.reset();