mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
OvmfPkg/VirtioInputDxe: ReadKeyStrokeEx must always expose KeyState
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name> Tested-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
This commit is contained in:
parent
434239eeab
commit
30d146175f
1 changed files with 5 additions and 0 deletions
|
|
@ -570,6 +570,11 @@ VirtioKeyboardReadKeyStrokeEx (
|
|||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
|
||||
Status = PopEfikeyBufHead (&Dev->KeyQueue, KeyData);
|
||||
// "There was no keystroke data available. Current KeyData.KeyState values are exposed."
|
||||
if (Status == EFI_NOT_READY) {
|
||||
ZeroMem (&KeyData->Key, sizeof (KeyData->Key));
|
||||
VirtioKeyboardInitializeKeyState (Dev, &KeyData->KeyState);
|
||||
}
|
||||
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue