소스 검색

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 년 전
부모
커밋
d2b6cd9a43
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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;