mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OcBootManagementLib: Fix key polling issue with PollAppleHotKeys=true
This commit is contained in:
parent
7b60d73018
commit
120c806604
@ -977,23 +977,23 @@ OcWaitForAppleKeyIndex (
|
||||
return OC_INPUT_INVALID;
|
||||
}
|
||||
|
||||
NumKeys = ARRAY_SIZE (Keys);
|
||||
Status = KeyMap->GetKeyStrokes (
|
||||
KeyMap,
|
||||
&Modifiers,
|
||||
&NumKeys,
|
||||
Keys
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "OCB: GetKeyStrokes - %r\n", Status));
|
||||
return OC_INPUT_INVALID;
|
||||
}
|
||||
|
||||
CurrTime = GetTimeInNanoSecond (GetPerformanceCounter ());
|
||||
EndTime = CurrTime + Timeout * 1000000000ULL;
|
||||
|
||||
while (Timeout == 0 || CurrTime == 0 || CurrTime < EndTime) {
|
||||
NumKeys = ARRAY_SIZE (Keys);
|
||||
Status = KeyMap->GetKeyStrokes (
|
||||
KeyMap,
|
||||
&Modifiers,
|
||||
&NumKeys,
|
||||
Keys
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "OCB: GetKeyStrokes - %r\n", Status));
|
||||
return OC_INPUT_INVALID;
|
||||
}
|
||||
|
||||
CurrTime = GetTimeInNanoSecond (GetPerformanceCounter ());
|
||||
|
||||
HasCommand = (Modifiers & (APPLE_MODIFIER_LEFT_COMMAND | APPLE_MODIFIER_RIGHT_COMMAND)) != 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user