Save the "working" palette in palette editor

it was saving the picture palette, ie palette before
any modification in the palette dialog.

fixes http://pulkomandy.tk/projects/GrafX2/ticket/121
This commit is contained in:
Thomas Bernard 2019-05-27 10:16:53 +02:00
parent d2777d79cb
commit be30792e93
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -2628,7 +2628,12 @@ void Button_Palette(int btn)
break;
case 27: // Save palette
// Save the working palette (the one currently being edited)
memcpy(backup_palette, Main.palette, sizeof(T_Palette));
memcpy(Main.palette, working_palette, sizeof(T_Palette));
Save_picture(CONTEXT_PALETTE);
memcpy(Main.palette, backup_palette, sizeof(T_Palette));
need_to_remap=1;
break;
case 28: // EHB : Amiga Extra Half Bright