diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-11-14 06:30:39 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-11-14 06:30:39 +0000 |
commit | 9cdadb7c941bd99b58a1ead2d23b58fdbbc387b7 (patch) | |
tree | 3ffda0b97c109f7949fc394acb3bfdfc7170428b /MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c | |
parent | 467cacbf77ef0bebd912ac4c7767b61c8820c52c (diff) | |
download | edk2-platforms-9cdadb7c941bd99b58a1ead2d23b58fdbbc387b7.tar.xz |
Enhance SetupBrowser to call ReadKeyStroke() before calling WaitForEvent(). This can handle the case when the UI is launched in lazy ConIn mode.
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Eric Dong<eric.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13942 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c index 720efb9a04..ae783b4ae3 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c @@ -1384,10 +1384,17 @@ WaitForKeyStroke ( {
EFI_STATUS Status;
- do {
- UiWaitForSingleEvent (gST->ConIn->WaitForKey, 0, 0);
+ while (TRUE) {
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, Key);
- } while (EFI_ERROR(Status));
+ if (!EFI_ERROR (Status)) {
+ break;
+ }
+ if (Status != EFI_NOT_READY) {
+ continue;
+ }
+
+ UiWaitForSingleEvent (gST->ConIn->WaitForKey, 0, 0);
+ }
return Status;
}
|