]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/WinNtGopDxe/WinNtGopScreen.c
CorebootModulePkg: Add EFIAPI to OnReadyToBoot to fix gcc compile fail
[mirror_edk2.git] / Nt32Pkg / WinNtGopDxe / WinNtGopScreen.c
index 85848aa6ce3eda0a479fdd4b9eb2eb9491365b6a..b15d621b3b2c28fe8ef2174deda2ab6788925d9c 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -379,7 +379,7 @@ WinNtGopSetMode (
     //\r
     // Adjust the window size\r
     //\r
-    Private->WinNtThunk->MoveWindow (Private->WindowHandle, Rect.left, Rect.top, Width, Height, TRUE);\r
+    Private->WinNtThunk->MoveWindow (Private->WindowHandle, Rect.left, Rect.top, (INT32)Width, (INT32)Height, TRUE);\r
 \r
   }\r
 \r
@@ -582,10 +582,10 @@ WinNtGopBlt (
     //\r
     // Mark the area we just blted as Invalid so WM_PAINT will update.\r
     //\r
-    Rect.left   = DestinationX;\r
-    Rect.top    = DestinationY;\r
-    Rect.right  = DestinationX + Width;\r
-    Rect.bottom = DestinationY + Height;\r
+    Rect.left   = (LONG)DestinationX;\r
+    Rect.top    = (LONG)DestinationY;\r
+    Rect.right  = (LONG)(DestinationX + Width);\r
+    Rect.bottom = (LONG)(DestinationY + Height);\r
     Private->WinNtThunk->InvalidateRect (Private->WindowHandle, &Rect, FALSE);\r
 \r
     //\r
@@ -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
@@ -902,7 +900,7 @@ WinNtGopThreadWinMain (
   Private->WindowsClass.hInstance     = NULL;\r
   Private->WindowsClass.hIcon         = Private->WinNtThunk->LoadIcon (NULL, IDI_APPLICATION);\r
   Private->WindowsClass.hCursor       = Private->WinNtThunk->LoadCursor (NULL, IDC_ARROW);\r
-  Private->WindowsClass.hbrBackground = (HBRUSH) COLOR_WINDOW;\r
+  Private->WindowsClass.hbrBackground = (HBRUSH)(UINTN)COLOR_WINDOW;\r
   Private->WindowsClass.lpszMenuName  = NULL;\r
   Private->WindowsClass.lpszClassName = WIN_NT_GOP_CLASS_NAME;\r
   Private->WindowsClass.hIconSm       = Private->WinNtThunk->LoadIcon (NULL, IDI_APPLICATION);\r
@@ -965,7 +963,7 @@ WinNtGopThreadWinMain (
     Private->WinNtThunk->DispatchMessage (&Message);\r
   }\r
 \r
-  return Message.wParam;\r
+  return (DWORD)Message.wParam;\r
 }\r
 \r
 \r