From: Toni Wilen Date: Fri, 15 Apr 2022 18:24:52 +0000 (+0300) Subject: Reinitialize Floppybridge support if drive mode is changed on the fly. X-Git-Tag: 41000~257 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=943d2ad3d53ce2ddbc3740e45dec649bab7e02eb;p=francis%2Fwinuae.git Reinitialize Floppybridge support if drive mode is changed on the fly. --- diff --git a/disk.cpp b/disk.cpp index 0cde9c30..109fe491 100644 --- 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);