Refinement to the last fix

This commit is contained in:
Lior Halphon 2018-03-23 19:54:11 +03:00
parent e9eeace995
commit 48a8db233d
1 changed files with 1 additions and 4 deletions

View File

@ -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);
}