Skip to content

Commit

Permalink
- When holding B, only skip DI device detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Oct 7, 2024
1 parent c2e75ac commit 8ae8e8f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions cube/swiss/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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);
}

0 comments on commit 8ae8e8f

Please sign in to comment.