]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix FPU state if FPU has is enabled but is not enabled in loaded statefile.
authorToni Wilen <twilen@winuae.net>
Wed, 11 Oct 2023 17:15:59 +0000 (20:15 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 11 Oct 2023 17:15:59 +0000 (20:15 +0300)
fpp.cpp
newcpu.cpp

diff --git a/fpp.cpp b/fpp.cpp
index 46b709444fe3b016216003572280995524307f27..e8f63c9257d3516ba332ef71327f1ae9aeca86e3 100644 (file)
--- 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;
index b9de88858a27f2028c9cbd21ab12e4552f81ac3a..80d51b38b257ccb6869e16dcc7bae6a61c55aa8a 100644 (file)
@@ -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;