Print(prompt);
- if (ReadAllKeyStrokes()) { // remove buffered key strokes
- refit_call1_wrapper(BS->Stall, 500000); // 0.5 seconds delay
- ReadAllKeyStrokes(); // empty the buffer again
- }
-
- refit_call3_wrapper(BS->WaitForEvent, 1, &ST->ConIn->WaitForKey, &Index);
- Status = refit_call2_wrapper(ST->ConIn->ReadKeyStroke, ST->ConIn, &Key);
- if (EFI_ERROR(Status))
- return 1;
+ ReadAllKeyStrokes(); // Remove buffered key strokes
+ do {
+ refit_call3_wrapper(BS->WaitForEvent, 1, &ST->ConIn->WaitForKey, &Index);
+ Status = refit_call2_wrapper(ST->ConIn->ReadKeyStroke, ST->ConIn, &Key);
+ if (EFI_ERROR(Status) && Status != EFI_NOT_READY)
+ return 1;
+ } while (Status == EFI_NOT_READY);
if (Key.UnicodeChar == 'y' || Key.UnicodeChar == 'Y') {
Print(L"Yes\n");
BOOLEAN GoOn = TRUE;
UINTN invalid;
- if (MyStriCmp(L"Apple", ST->FirmwareVendor)) {
+ if (!MyStriCmp(L"Apple", ST->FirmwareVendor)) {
Print(L"Your firmware is made by %s.\n", ST->FirmwareVendor);
Print(L"Ordinarily, a hybrid MBR (which this program creates) should be used ONLY on\n");
Print(L"Apple Macs that dual-boot with Windows or some other BIOS-mode OS. Are you\n");