VOID OptionMenuCustomBoot(VOID) { PCSTR CustomBootMenuList[] = { #ifdef _M_IX86 "Disk", "Partition", "Boot Sector File", "Linux", #endif "ReactOS" }; ULONG SelectedMenuItem; if (!UiDisplayMenu("Please choose a boot method:", "", FALSE, CustomBootMenuList, sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]), 0, -1, &SelectedMenuItem, TRUE, NULL)) { /* The user pressed ESC */ return; } switch (SelectedMenuItem) { #ifdef _M_IX86 case 0: // Disk OptionMenuCustomBootDisk(); break; case 1: // Partition OptionMenuCustomBootPartition(); break; case 2: // Boot Sector File OptionMenuCustomBootBootSectorFile(); break; case 3: // Linux OptionMenuCustomBootLinux(); break; case 4: // ReactOS #else case 0: #endif OptionMenuCustomBootReactOS(); break; } }
VOID OptionMenuCustomBoot(VOID) { PCSTR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" }; ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); ULONG SelectedMenuItem; if (!UiDisplayMenu("Please choose a boot method:", "", FALSE, CustomBootMenuList, CustomBootMenuCount, 0, -1, &SelectedMenuItem, TRUE, NULL)) { // The user pressed ESC return; } switch (SelectedMenuItem) { case 0: // Disk OptionMenuCustomBootDisk(); break; case 1: // Partition OptionMenuCustomBootPartition(); break; case 2: // Boot Sector File OptionMenuCustomBootBootSectorFile(); break; case 3: // ReactOS OptionMenuCustomBootReactOS(); break; case 4: // Linux OptionMenuCustomBootLinux(); break; } }