]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Reinitialize Floppybridge support if drive mode is changed on the fly.
authorToni Wilen <twilen@winuae.net>
Fri, 15 Apr 2022 18:24:52 +0000 (21:24 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 15 Apr 2022 18:24:52 +0000 (21:24 +0300)
disk.cpp

index 0cde9c308a769dad11610f0e8b9cf62766c7b920..109fe4919be1d85083e3643f7933586d646c2843 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -3300,7 +3300,13 @@ static void DISK_check_change (void)
                        setdskchangetime(drv, 2 * 50 * 312);
                }
                if (currprefs.floppyslots[i].dfxtype != changed_prefs.floppyslots[i].dfxtype) {
+                       int old = currprefs.floppyslots[i].dfxtype;
                        currprefs.floppyslots[i].dfxtype = changed_prefs.floppyslots[i].dfxtype;
+#ifdef FLOPPYBRIDGE
+                       if (old >= DRV_FB || currprefs.floppyslots[i].dfxtype >= DRV_FB) {
+                               floppybridge_init(&currprefs);
+                       }
+#endif
                        reset_drive (i);
 #ifdef RETROPLATFORM
                        rp_floppy_device_enable (i, currprefs.floppyslots[i].dfxtype >= 0);