More accurate emulation of LCDC.0

This commit is contained in:
Lior Halphon 2018-04-05 12:27:01 +03:00
parent d8e0683c35
commit d785e45308
1 changed files with 2 additions and 5 deletions

View File

@ -366,11 +366,8 @@ static void render_pixel_if_possible(GB_gameboy_t *gb)
bg_enabled = true; bg_enabled = true;
} }
if (!bg_enabled) { {
gb->screen[gb->position_in_line + gb->current_line * WIDTH] = gb->rgb_encode_callback(gb, 0xFF, 0xFF, 0xFF); uint8_t pixel = bg_enabled? fifo_item->pixel : 0;
}
else {
uint8_t pixel = fifo_item->pixel;
if (pixel && bg_priority) { if (pixel && bg_priority) {
draw_oam = false; draw_oam = false;
} }