/** @file\r
\r
Copyright (c) 2006 - 2018, 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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
Module Name:\r
\r
\r
Routine Description:\r
Reads the next keystroke from the input device. The WaitForKey Event can\r
- be used to test for existance of a keystroke via WaitForEvent () call.\r
+ be used to test for existence of a keystroke via WaitForEvent () call.\r
\r
Arguments:\r
Private - The private structure of WinNt Gop device.\r
\r
Returns:\r
EFI_SUCCESS - The keystroke information was returned.\r
- EFI_NOT_READY - There was no keystroke data availiable.\r
+ EFI_NOT_READY - There was no keystroke data available.\r
EFI_DEVICE_ERROR - The keystroke information was not returned due to\r
hardware errors.\r
EFI_INVALID_PARAMETER - KeyData is NULL.\r
\r
Private = GRAPHICS_PRIVATE_DATA_FROM_THIS (GraphicsIo);\r
\r
- return EFI_NOT_READY;\r
-}\r
+ if (!Private->PointerStateChanged) {\r
+ return EFI_NOT_READY;\r
+ }\r
\r
+ return EFI_SUCCESS;\r
+}\r
\r
EFI_STATUS\r
EFIAPI\r
\r
Private = GRAPHICS_PRIVATE_DATA_FROM_THIS (GraphicsIo);\r
\r
- return EFI_NOT_READY;\r
+ if (!Private->PointerStateChanged) {\r
+ return EFI_NOT_READY;\r
+ }\r
+\r
+ State->RelativeMovementX = Private->PointerState.RelativeMovementX;\r
+ State->RelativeMovementY = Private->PointerState.RelativeMovementY;\r
+ State->RelativeMovementZ = Private->PointerState.RelativeMovementZ;\r
+ State->LeftButton = Private->PointerState.LeftButton;\r
+ State->RightButton = Private->PointerState.RightButton;\r
+\r
+ Private->PointerState.RelativeMovementX = 0;\r
+ Private->PointerState.RelativeMovementY = 0;\r
+ Private->PointerState.RelativeMovementZ = 0;\r
+\r
+ Private->PointerStateChanged = FALSE;\r
+\r
+ return EFI_SUCCESS;\r
}\r