From: Toni Wilen Date: Fri, 12 Jul 2019 16:40:49 +0000 (+0300) Subject: Do not save AGA colors statefile chunk if all colors have defaults. X-Git-Tag: 4300~179 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=d9779c18bf49f771ba3709c797d8e2f03744386c;p=francis%2Fwinuae.git Do not save AGA colors statefile chunk if all colors have defaults. --- diff --git a/custom.cpp b/custom.cpp index 7d4ba0f4..b0531d4f 100644 --- a/custom.cpp +++ b/custom.cpp @@ -11057,6 +11057,16 @@ uae_u8 *save_custom_agacolors (int *len, uae_u8 *dstptr) { uae_u8 *dstbak, *dst; + if (!(currprefs.chipset_mask & CSMASK_AGA)) { + int i; + for (i = 0; i < 256; i++) { + if (current_colors.color_regs_aga[i] || color_regs_genlock[i]) + break; + } + if (i == 256) + return NULL; + } + if (dstptr) dstbak = dst = dstptr; else