From 943d2ad3d53ce2ddbc3740e45dec649bab7e02eb Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 15 Apr 2022 21:24:52 +0300 Subject: [PATCH] Reinitialize Floppybridge support if drive mode is changed on the fly. --- disk.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.47.3