MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / PauseForKey

Function PauseForKey

rEFIt_UEFI/Platform/BasicIO.cpp:39–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39VOID PauseForKey(CONST CHAR16* msg)
40{
41 UINTN index;
42 if (msg) {
43 printf("\n %ls", msg);
44 }
45 printf("\n* Hit any key to continue *");
46
47 if (ReadAllKeyStrokes()) { // remove buffered key strokes
48 gBS->Stall(5000000); // 5 seconds delay
49 ReadAllKeyStrokes(); // empty the buffer again
50 }
51
52 gBS->WaitForEvent(1, &gST->ConIn->WaitForKey, &index);
53 ReadAllKeyStrokes(); // empty the buffer to protect the menu
54
55 printf("\n");
56}
57
58// Jief, TODO : not sure of the difference between this and PauseForKey. Looks like none. Can it be removed ?
59

Callers 6

LegacyBiosFarCall86Function · 0.70
bootPBRFunction · 0.70
all_testsFunction · 0.50
LoadEFIImageListFunction · 0.50
RefitMainFunction · 0.50
FinishExternalScreenFunction · 0.50

Calls 3

printfFunction · 0.85
StallMethod · 0.80
ReadAllKeyStrokesFunction · 0.70

Tested by 1

all_testsFunction · 0.40