From 5cb74fb68479e5bea95958a9ca5667b732463f98 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 24 Mar 2018 02:58:37 +0300 Subject: [PATCH] Bugfix: turning the PPU off during OAM mode made the OAM bug persist while the LCD is off --- Core/display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/display.c b/Core/display.c index f95a252..36363fb 100755 --- a/Core/display.c +++ b/Core/display.c @@ -287,6 +287,8 @@ void GB_lcd_off(GB_gameboy_t *gb) gb->window_disabled_while_active = false; gb->current_line = 0; gb->ly_for_comparison = 0; + + gb->oam_search_index = 0; } static void add_object_from_index(GB_gameboy_t *gb, unsigned index)