Fixed set_color_correction breaking DMG’s palette

This commit is contained in:
Lior Halphon 2017-10-16 20:48:39 +03:00
parent a753e00b59
commit e71154b7e0

View File

@ -289,11 +289,13 @@ void GB_palette_changed(GB_gameboy_t *gb, bool background_palette, uint8_t index
void GB_set_color_correction_mode(GB_gameboy_t *gb, GB_color_correction_mode_t mode)
{
gb->color_correction_mode = mode;
if (gb->is_cgb) {
for (unsigned i = 0; i < 32; i++) {
GB_palette_changed(gb, false, i * 2);
GB_palette_changed(gb, true, i * 2);
}
}
}
/*
STAT interrupt is implemented based on this finding: