From d785e453083b5c1bf9c00d49e16011c329634d30 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 5 Apr 2018 12:27:01 +0300 Subject: [PATCH] More accurate emulation of LCDC.0 --- Core/display.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/display.c b/Core/display.c index fbdc23b..d20ea07 100644 --- a/Core/display.c +++ b/Core/display.c @@ -366,11 +366,8 @@ static void render_pixel_if_possible(GB_gameboy_t *gb) bg_enabled = true; } - if (!bg_enabled) { - gb->screen[gb->position_in_line + gb->current_line * WIDTH] = gb->rgb_encode_callback(gb, 0xFF, 0xFF, 0xFF); - } - else { - uint8_t pixel = fifo_item->pixel; + { + uint8_t pixel = bg_enabled? fifo_item->pixel : 0; if (pixel && bg_priority) { draw_oam = false; }