소스 검색

Fix onboard eject button on SD card reinsert

For boards with builtin eject buttons that default to the first
removable device when no device is assigned an eject button in
`bluescsi.ini`, the eject button auto assignment is lost after
ejecting the SD card and reinserting.

Reinitializing the eject button's auto assignment after the SD card has
been reinserted fixes the issue.

Also cleaned up the log messaging when an eject button is pressed.
J. Morio Sakaguchi 3 달 전
부모
커밋
c1d1271099
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      src/BlueSCSI.cpp
  2. 1 1
      src/BlueSCSI_disk.cpp

+ 1 - 0
src/BlueSCSI.cpp

@@ -1315,6 +1315,7 @@ extern "C" void bluescsi_main_loop(void)
         print_sd_info();
         reinitSCSI();
         init_logfile();
+        init_eject_button();
         blinkStatus(BLINK_STATUS_OK);
       }
       else if (!g_romdrive_active)

+ 1 - 1
src/BlueSCSI_disk.cpp

@@ -1230,7 +1230,7 @@ static void diskEjectAction(uint8_t buttonId)
             if (img.deviceType == S2S_CFG_OPTICAL)
             {
                 found = true;
-                logmsg("Eject button ", (int)buttonId, " pressed, passing to CD drive SCSI", (int)i);
+                logmsg("Eject button ", (int)buttonId, " pressed, passing to CD drive SCSI ID: ", (int)i);
                 cdromPerformEject(img);
             }
             else if (img.deviceType == S2S_CFG_ZIP100