From: Toni Wilen Date: Wed, 11 Oct 2023 17:15:59 +0000 (+0300) Subject: Fix FPU state if FPU has is enabled but is not enabled in loaded statefile. X-Git-Tag: 5.1.0~80 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=49cc0cf9c23c236bed88088c384adad43bed8697;p=francis%2Fwinuae.git Fix FPU state if FPU has is enabled but is not enabled in loaded statefile. --- diff --git a/fpp.cpp b/fpp.cpp index 46b70944..e8f63c92 100644 --- a/fpp.cpp +++ b/fpp.cpp @@ -3741,8 +3741,8 @@ uae_u8 *restore_fpu (uae_u8 *src) int i; uae_u32 flags; - fpu_reset(); changed_prefs.fpu_model = currprefs.fpu_model = restore_u32 (); + fpu_reset(); flags = restore_u32 (); for (i = 0; i < 8; i++) { w1 = restore_u16 () << 16; diff --git a/newcpu.cpp b/newcpu.cpp index b9de8885..80d51b38 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -6904,6 +6904,8 @@ uae_u8 *restore_cpu (uae_u8 *src) int flags, model; uae_u32 l; + changed_prefs.fpu_model = currprefs.fpu_model = 0; + changed_prefs.mmu_model = currprefs.mmu_model = 0; currprefs.cpu_model = changed_prefs.cpu_model = model = restore_u32 (); flags = restore_u32 (); changed_prefs.address_space_24 = 0;