]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix a bug which cause a CRTL, ALT, or SHIFT is pressed on the GOP console for NT32...
authorqianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Oct 2011 09:36:55 +0000 (09:36 +0000)
committerqianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Oct 2011 09:36:55 +0000 (09:36 +0000)
Root cause is that the parameter of UnicodeStr doesn’t initialize.

Signed-off-by: qianouyang
Reviewed-by: niruiyu
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12575 6f19259b-4bc3-4df7-8a09-765794883524

Nt32Pkg/WinNtGopDxe/WinNtGopScreen.c

index 85848aa6ce3eda0a479fdd4b9eb2eb9491365b6a..607caad2e9a491da85e704f8fdd37f0118d57ea8 100644 (file)
@@ -781,7 +781,7 @@ WinNtGopThreadWindowProc (
     // The ESC key also generate WM_CHAR.\r
     //\r
     if (wParam == 0x1B) {\r
-         return 0;\r
+           return 0;\r
     }    \r
 \r
     if (AltIsPress == TRUE) {\r
@@ -815,15 +815,13 @@ WinNtGopThreadWindowProc (
     return 0;\r
 \r
   case WM_KEYDOWN:\r
-    Key.ScanCode = SCAN_NULL;\r
+    Key.ScanCode    = SCAN_NULL;\r
+    Key.UnicodeChar = CHAR_NULL;\r
     //\r
     // A value key press will cause a WM_KEYDOWN first, then cause a WM_CHAR\r
     // So if there is no modifier key updated, skip the WM_KEYDOWN even.\r
     //\r
     if (WinNtGopConvertParamToEfiKey (Private, &wParam, &lParam, &Key)) {\r
-      if (Key.ScanCode != SCAN_NULL) {\r
-        Key.UnicodeChar = CHAR_NULL;\r
-      }\r
       //\r
       // Support the partial keystroke, add all keydown event into the queue.\r
       //\r