From 48a8db233da2bd580398261a714643b3869bad9b Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 23 Mar 2018 19:54:11 +0300 Subject: [PATCH] Refinement to the last fix --- Core/display.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Core/display.c b/Core/display.c index 70b3a1f..2eb758d 100755 --- a/Core/display.c +++ b/Core/display.c @@ -322,7 +322,7 @@ static void render_pixel_if_possible(GB_gameboy_t *gb) if (!gb->oam_fifo_paused && fifo_size(&gb->oam_fifo)) { oam_fifo_item = fifo_pop(&gb->oam_fifo); - if (oam_fifo_item->pixel) { + if (oam_fifo_item->pixel && (gb->io_registers[GB_IO_LCDC] & 2)) { draw_oam = true; bg_priority |= oam_fifo_item->bg_priority; } @@ -357,9 +357,6 @@ static void render_pixel_if_possible(GB_gameboy_t *gb) if (pixel && bg_priority) { draw_oam = false; } - else if ((gb->io_registers[GB_IO_LCDC] & 2) == 0) { - draw_oam = false; - } if (!gb->cgb_mode) { pixel = ((gb->io_registers[GB_IO_BGP] >> (pixel << 1)) & 3); }