From 64c3bc77719c36244f384e8671487623785e4c95 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 17 Jan 2010 20:01:37 +0000 Subject: [PATCH] The skin preview could corrupt the screen palette. Now always restore it properly. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1270 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- buttons.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buttons.c b/buttons.c index 81857115..ab199506 100644 --- a/buttons.c +++ b/buttons.c @@ -1162,6 +1162,7 @@ void Button_Skins(void) Pixel_in_window(x, y, MC_Light); } // Actualize current screen according to preferred GUI colors + // Note this only updates onscreen colors Set_color( MC_Dark, gfx->Default_palette[gfx->Color_dark].R, @@ -1229,10 +1230,9 @@ void Button_Skins(void) Compute_optimal_menu_colors(Main_palette); } - else - { - Set_palette(Main_palette); - } + + // We don't want to keep the skin's palette, as this would corrupt the current picture's one. + Set_palette(Main_palette); Close_window(); Unselect_button(BUTTON_SETTINGS);