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
This commit is contained in:
Adrien Destugues 2010-01-17 20:01:37 +00:00
parent 28b2122997
commit 64c3bc7771

View File

@ -1162,6 +1162,7 @@ void Button_Skins(void)
Pixel_in_window(x, y, MC_Light); Pixel_in_window(x, y, MC_Light);
} }
// Actualize current screen according to preferred GUI colors // Actualize current screen according to preferred GUI colors
// Note this only updates onscreen colors
Set_color( Set_color(
MC_Dark, MC_Dark,
gfx->Default_palette[gfx->Color_dark].R, gfx->Default_palette[gfx->Color_dark].R,
@ -1229,10 +1230,9 @@ void Button_Skins(void)
Compute_optimal_menu_colors(Main_palette); Compute_optimal_menu_colors(Main_palette);
} }
else
{ // We don't want to keep the skin's palette, as this would corrupt the current picture's one.
Set_palette(Main_palette); Set_palette(Main_palette);
}
Close_window(); Close_window();
Unselect_button(BUTTON_SETTINGS); Unselect_button(BUTTON_SETTINGS);