if bg/window disabled clear with white

This commit is contained in:
Alex Janka 2023-02-08 09:20:57 +11:00
parent 72bdc2212b
commit 3b2a07c264

View file

@ -289,6 +289,11 @@ impl CPU {
if lcdc.window_enable {
self.render_scanline_window(scanline, lcdc, palette);
}
} else {
for x in 0..WIDTH {
self.gpu.buffer[(scanline as usize * WIDTH) + x] =
Colour::from_u8_rgb(255, 255, 255);
}
}
if lcdc.obj_enable {
self.render_scanline_obj(scanline, lcdc);