fix error colour correction to be when on cgb rather than when on cgb in cgb mode

This commit is contained in:
Alex Janka 2023-04-23 16:35:35 +10:00
parent ba9a601874
commit fc2ebd4ca2

View file

@ -322,7 +322,7 @@ where
}
for x in 0..WIDTH {
self.buffer[(scanline as usize * WIDTH) + x] = ColourInner::Error
.rgb_bytes(None, self.is_cgb_mode())
.rgb_bytes(None, self.cgb_data.is_some())
.into();
}
if self.lcdc.bg_window_enable {
@ -337,7 +337,7 @@ where
} else {
for x in 0..WIDTH {
self.buffer[(scanline as usize * WIDTH) + x] = ColourInner::Error
.rgb_bytes(None, self.is_cgb_mode())
.rgb_bytes(None, self.cgb_data.is_some())
.into();
}
}
@ -490,7 +490,7 @@ where
});
self.buffer[buffer_index] =
colour.rgb_bytes(cgb_data, self.is_cgb_mode()).into();
colour.rgb_bytes(cgb_data, self.cgb_data.is_some()).into();
}
}
}
@ -568,7 +568,7 @@ where
.map(|v| (v.palettes.bg, attributes.palette));
self.buffer[(scanline as usize * WIDTH) + x] =
colour.rgb_bytes(cgb_data, self.is_cgb_mode()).into();
colour.rgb_bytes(cgb_data, self.cgb_data.is_some()).into();
}
}