From 8ae8e8f1ed0eb1087c8246a5b6ad260fbf09c66f Mon Sep 17 00:00:00 2001 From: Extrems Date: Sun, 6 Oct 2024 22:04:03 -0400 Subject: [PATCH] - When holding B, only skip DI device detection. --- cube/swiss/source/main.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/cube/swiss/source/main.c b/cube/swiss/source/main.c index 4ed0cf30..69fa33af 100644 --- a/cube/swiss/source/main.c +++ b/cube/swiss/source/main.c @@ -42,7 +42,10 @@ dvddrvinfo driveInfo __attribute__((aligned(32))); SwissSettings swissSettings; static void driveInfoCallback(s32 result, dvdcmdblk *block) { - if(result >= 0) { + if(result == DVD_ERROR_CANCELED) { + DVD_StopMotorAsync(block, NULL); + } + else if(result >= 0) { swissSettings.hasDVDDrive = 1; } } @@ -290,17 +293,13 @@ int main(int argc, char *argv[]) // Checks if devices are available, prints name of device being detected for slow init devices void populateDeviceAvailability() { - if(padsButtonsHeld() & PAD_BUTTON_B) { - deviceHandler_setAllDevicesAvailable(); - return; - } uiDrawObj_t *msgBox = DrawPublish(DrawProgressBar(true, 0, "Detecting devices\205\nThis can be skipped by holding B next time")); while(DVD_GetCmdBlockStatus(&commandBlock) == DVD_STATE_BUSY) { if(DVD_LowGetCoverStatus() == 1) { break; } if(padsButtonsHeld() & PAD_BUTTON_B) { - deviceHandler_setAllDevicesAvailable(); + DVD_CancelAsync(&commandBlock, NULL); break; } } @@ -310,10 +309,6 @@ void populateDeviceAvailability() { print_gecko("Checking device availability for device %s\r\n", allDevices[i]->deviceName); deviceHandler_setDeviceAvailable(allDevices[i], allDevices[i]->test()); } - if(padsButtonsHeld() & PAD_BUTTON_B) { - deviceHandler_setAllDevicesAvailable(); - break; - } } DrawDispose(msgBox); }