int Mount_Devices() { printf("\n\nMounting available storage devices...\n"); Init_SD(); Init_USB(); if (!SDmnt && !USBmnt) { printf("No device detected..."); return -2; } else if ((SDmnt && !USBmnt) || (!SDmnt && USBmnt)) { isSD = (SDmnt && !USBmnt); printf("The %s will be used as the storage device.", (isSD ? "SD card" : "USB drive")); sleep(2); } else { u32 pressed; printf("Press A to use the SD Card.\n"); printf("Press B to use the USB device.\n"); while(true) { pressed = DetectInput(DI_BUTTONS_DOWN); if (pressed == WPAD_BUTTON_A) { isSD = true; break; } if (pressed == WPAD_BUTTON_B) { isSD = false; break; } } } return 0; }
s32 get_IOS(IOS **ios, u32 iosnr, u32 revision) { char buf[64]; /* u32 pressed; u32 pressedGC; int selection = 0;*/ int ret; ret = Init_SD(); /* if(ret >= 0) { sprintf(buf, "sd:/IOS%u-64-v%u.wad", iosnr, revision); ret = Wad_Read_into_memory(buf, ios, iosnr, revision); if(ret < 0) { sprintf(buf, "sd:/IOS%u-64-v%u.wad.out.wad", iosnr, revision); ret = Wad_Read_into_memory(buf, ios, iosnr, revision); } Close_SD(); } if(ret < 0) */ ret = Nand_Read_into_memory(ios, iosnr, revision); return ret; }