From e71154b7e0d2de833c3c1a56f9744812166634da Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Mon, 16 Oct 2017 20:48:39 +0300 Subject: [PATCH] =?UTF-8?q?Fixed=20set=5Fcolor=5Fcorrection=20breaking=20D?= =?UTF-8?q?MG=E2=80=99s=20palette?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/display.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/display.c b/Core/display.c index 42c43b6..4466e34 100755 --- a/Core/display.c +++ b/Core/display.c @@ -289,9 +289,11 @@ 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; - for (unsigned i = 0; i < 32; i++) { - GB_palette_changed(gb, false, i * 2); - GB_palette_changed(gb, true, i * 2); + 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); + } } }