void Menu_Loop(void) { u8 iosVersion; /* Select IOS menu */ Menu_SelectIOS(); /* Retrieve IOS version */ iosVersion = IOS_GetVersion(); /* NAND device menu */ if (iosVersion == CIOS_VERSION) Menu_NandDevice(); for (;;) { /* FAT device menu */ Menu_FatDevice(); /* WAD list menu */ Menu_WadList(); } }
void Menu_Loop(void) { u8 iosVersion; /* Select IOS menu */ Menu_SelectIOS(); /* Retrieve IOS version */ iosVersion = IOS_GetVersion(); ndev = &ndevList[0]; /* NAND device menu */ if ((iosVersion == CIOS_VERSION || iosVersion == 250) && IOS_GetRevision() >13) { Menu_NandDevice(); } for (;;) { /* FAT device menu */ Menu_FatDevice(); /* WAD list menu */ Menu_WadList(); } }
void Menu_FatDevice(void) { s32 ret, selected = 0; /* Unmount FAT device */ if (fdev) Fat_Unmount(fdev); /* Select source device */ if (gConfig.fatDeviceIndex < 0) { for (;;) { /* Clear console */ Con_Clear(); /* Selected device */ fdev = &fdevList[selected]; printf("\t>> Select source device: < %s >\n\n", fdev->name); printf("\t Press LEFT/RIGHT to change the selected device.\n\n"); printf("\t Press A button to continue.\n"); printf("\t Press HOME button to restart.\n\n"); u32 buttons = WaitButtons(); /* LEFT/RIGHT buttons */ if (buttons & WPAD_BUTTON_LEFT) { if ((--selected) <= -1) selected = (NB_FAT_DEVICES - 1); } if (buttons & WPAD_BUTTON_RIGHT) { if ((++selected) >= NB_FAT_DEVICES) selected = 0; } /* HOME button */ if (buttons & WPAD_BUTTON_HOME) Restart(); /* A button */ if (buttons & WPAD_BUTTON_A) break; } } else { fdev = &fdevList[gConfig.fatDeviceIndex]; } printf("[+] Mounting device, please wait..."); fflush(stdout); /* Mount FAT device */ ret = Fat_Mount(fdev); if (ret < 0) { printf(" ERROR! (ret = %d)\n", ret); goto err; } else printf(" OK!\n"); return; err: WiiLightControl (WII_LIGHT_OFF); printf("\n"); printf(" Press any button to continue...\n"); WaitButtons(); /* Prompt menu again */ Menu_FatDevice(); }