summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg/EmuGopDxe
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-28 18:11:34 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-28 18:11:34 +0000
commit2fbfd3f942e9cb7586f3cd713a4a375cf8fa2ac4 (patch)
tree1d0303581ed2c14ddd028d0a000559fad7ad706d /EmulatorPkg/EmuGopDxe
parentd18d8a1d0e370f8ce6ccc2725f4170586d457e53 (diff)
downloadedk2-2fbfd3f942e9cb7586f3cd713a4a375cf8fa2ac4.tar.gz
edk2-2fbfd3f942e9cb7586f3cd713a4a375cf8fa2ac4.tar.bz2
edk2-2fbfd3f942e9cb7586f3cd713a4a375cf8fa2ac4.zip
EmulatorPkg: Fix issue with ReadKeyStroke returning EFI_SUCCESS when only a modifier key is pressed.
This should only happen for ReadKeyStrokeEx. signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11920 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmulatorPkg/EmuGopDxe')
-rw-r--r--EmulatorPkg/EmuGopDxe/GopInput.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/EmulatorPkg/EmuGopDxe/GopInput.c b/EmulatorPkg/EmuGopDxe/GopInput.c
index 571776b194..288a151d6d 100644
--- a/EmulatorPkg/EmuGopDxe/GopInput.c
+++ b/EmulatorPkg/EmuGopDxe/GopInput.c
@@ -189,7 +189,14 @@ EmuGopSimpleTextInReadKeyStroke (
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
Status = Private->EmuGraphicsWindow->GetKey (Private->EmuGraphicsWindow, &KeyData);
- CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ if (!EFI_ERROR (Status)) {
+ if ((KeyData.Key.ScanCode == 0) && (KeyData.Key.UnicodeChar == 0)) {
+ // Modifier key was pressed
+ Status = EFI_NOT_READY;
+ } else {
+ CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
+ }
+ }
//
// Leave critical section and return