From: Toni Wilen Date: Mon, 30 Jun 2025 15:51:31 +0000 (+0300) Subject: Fix statefile restore uae boot rom type X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=2bb5d4497e663ee8da4d6c4056f676680903d426;p=francis%2Fwinuae.git Fix statefile restore uae boot rom type --- diff --git a/expansion.cpp b/expansion.cpp index 6b30c484..5a052f8a 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -4133,11 +4133,10 @@ uae_u8 *save_expansion_boards(size_t *len, uae_u8 *dstptr, int cardnum) uae_u8 *restore_expansion_boards(uae_u8 *src) { + static bool uaeboardrestorefirst; if (!src) { restore_cardno = 0; -#if 0 - currprefs.uaeboard = changed_prefs.uaeboard = -1; -#endif + uaeboardrestorefirst = true; return NULL; } TCHAR *s; @@ -4158,14 +4157,14 @@ uae_u8 *restore_expansion_boards(uae_u8 *src) for (int j = 0; j < 16; j++) { ec->aci.autoconfig_bytes[j] = restore_u8(); } -#if 0 if (ec->flags & CARD_FLAG_UAEROM) { if (ec->base >= 0xe90000 && ec->base < 0xf00000) { if (ec->size > 65536) { currprefs.uaeboard = changed_prefs.uaeboard = 2; } else { - if (currprefs.uaeboard < 0) { + if (uaeboardrestorefirst) { currprefs.uaeboard = changed_prefs.uaeboard = 0; + uaeboardrestorefirst = false; } else { currprefs.uaeboard = changed_prefs.uaeboard = 1; } @@ -4174,7 +4173,6 @@ uae_u8 *restore_expansion_boards(uae_u8 *src) currprefs.uaeboard = changed_prefs.uaeboard = 0; } } -#endif uae_u32 dev_num = 0; uae_u32 romtype = restore_u32(); if (romtype != 0xffffffff) {