Browse Source

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 months ago
parent
commit
c1d1271099
2 changed files with 2 additions and 1 deletions
  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