Exemple #1
0
// Checks if devices are available, prints name of device being detected for slow init devices
void populateDeviceAvailability() {
	if(PAD_ButtonsHeld(0) & PAD_BUTTON_B) {
		deviceHandler_setAllDevicesAvailable();
		return;
	}
	uiDrawObj_t *msgBox = DrawPublish(DrawProgressBar(true, 0, "Detecting devices ...\nThis can be skipped by holding B next time"));
	int i;
	for(i = 0; i < MAX_DEVICES; i++) {
		if(allDevices[i] != NULL && !deviceHandler_getDeviceAvailable(allDevices[i])) {
			print_gecko("Checking device availability for device %s\r\n", allDevices[i]->deviceName);
			deviceHandler_setDeviceAvailable(allDevices[i], allDevices[i]->test());
		}
		if(PAD_ButtonsHeld(0) & PAD_BUTTON_B) {
			deviceHandler_setAllDevicesAvailable();
			break;
		}
	}
	DrawDispose(msgBox);
}
Exemple #2
0
// Checks if devices are available, prints name of device being detected for slow init devices
void populateDeviceAvailability() {
	DrawFrameStart();
	DrawMessageBox(D_INFO, "Detecting devices ...\nThis can be skipped by holding B next time");
	DrawFrameFinish();
	if(PAD_ButtonsHeld(0) & PAD_BUTTON_B) {
		deviceHandler_setAllDevicesAvailable();
		return;
	}
	const DISC_INTERFACE* carda = &__io_gcsda;
	const DISC_INTERFACE* cardb = &__io_gcsdb;
	// DVD
	deviceHandler_setDeviceAvailable(DVD_DISC, swissSettings.hasDVDDrive);
	// SD Gecko
	DrawFrameStart();
	DrawMessageBox(D_INFO, "Detecting devices [SD] ...\nThis can be skipped by holding B next time");
	DrawFrameFinish();
	deviceHandler_setDeviceAvailable(SD_CARD, carda->isInserted() || cardb->isInserted());
	// IDE-EXI
	DrawFrameStart();
	DrawMessageBox(D_INFO, "Detecting devices [IDE-EXI] ...\nThis can be skipped by holding B next time");
	DrawFrameFinish();
	deviceHandler_setDeviceAvailable(IDEEXI, ide_exi_inserted(0) || ide_exi_inserted(1));
	// Qoob
	deviceHandler_setDeviceAvailable(QOOB_FLASH, 0);	// Hidden by default, add auto detect at some point
	// WODE
	deviceHandler_setDeviceAvailable(WODE, 0);	// Hidden by default, add auto detect at some point
	// Memory card
	DrawFrameStart();
	DrawMessageBox(D_INFO, "Detecting devices [Memory Card] ...\nThis can be skipped by holding B next time");
	DrawFrameFinish();
	deviceHandler_setDeviceAvailable(MEMCARD, (initialize_card(0)==CARD_ERROR_READY) || (initialize_card(1)==CARD_ERROR_READY));
	// WKF/WASP
	DrawFrameStart();
	DrawMessageBox(D_INFO, "Detecting devices [WKF/WASP] ...\nThis can be skipped by holding B next time");
	DrawFrameFinish();
	deviceHandler_setDeviceAvailable(WKF, swissSettings.hasDVDDrive && (__wkfSpiReadId() != 0 && __wkfSpiReadId() != 0xFFFFFFFF));
	// USB Gecko
	deviceHandler_setDeviceAvailable(USBGECKO, usb_isgeckoalive(1));
	// BBA/SAMBA
	deviceHandler_setDeviceAvailable(SAMBA, exi_bba_exists());
	// System, always there
	deviceHandler_setDeviceAvailable(SYS, 1);
}