Răsfoiți Sursa

Fix CD media change not properly detected on some hosts

Tested with MSCDEX and SHSUCDX, without this change they do not detect the media change, and keep reporting the file system of the first loaded CD image.
If after changing image the user then attempts to navigate the new CD regardless, eventually the OS driver will get into a weird state and be unable to use the drive again.
Niels Martin Hansen 1 an în urmă
părinte
comite
d2b6cd9a43
1 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 4 1
      src/ZuluSCSI_cdrom.cpp

+ 4 - 1
src/ZuluSCSI_cdrom.cpp

@@ -1250,7 +1250,10 @@ bool cdromSwitchNextImage(image_config_t &img, const char* next_filename)
         {
             if (next_filename != nullptr)
             {
-                img.ejected = false;
+                // present the drive as ejected until the host queries it again,
+                // to make sure host properly detects the media change
+                img.ejected = true;
+                img.reinsert_after_eject = true;
                 img.cdrom_events = 2; // New Media
             }
             return true;