Skip to content

Commit

Permalink
Clear BG/window when it is not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
binji committed Aug 5, 2021
1 parent e7e6799 commit 408bee8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/emulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3324,6 +3324,14 @@ static void ppu_mode3_synchronize(Emulator* e) {
pixel[i] = pal->color[palette_index];
bg_is_zero[i] = palette_index == 0;
bg_priority[i] = priority;
} else {
if (IS_CGB) {
pixel[i] = PPU.bgcp.palettes[0].color[0];
} else if (IS_SGB) {
pixel[i] = e->sgb_pal[0].color[0];
} else {
pixel[i] = e->color_to_rgba[0].color[0];
}
}
}

Expand Down

0 comments on commit 408bee8

Please sign in to comment.