ShellPkg: Fix the incorrect behavior when pressing 'shift' key.
If 'ReadKeyStroke' function return EFI_NOT_READY then skip it. If the return value is EFI_DEVICE_ERROR clean the currentString buffer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Pedroa Liu <pedroa.liu@insyde.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
This commit is contained in:
@ -422,6 +422,12 @@ FileInterfaceStdInRead(
|
|||||||
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);
|
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);
|
||||||
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
|
||||||
|
if (Status == EFI_NOT_READY)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
ZeroMem (CurrentString, MaxStr * sizeof(CHAR16));
|
||||||
|
StringLen = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user