* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * Modifications copyright (c) 2012-2015 Roderick W. Smith
+ * Modifications copyright (c) 2012-2017 Roderick W. Smith
*
* Modifications distributed under the terms of the GNU General Public
* License (GPL) version 3 (GPLv3), or (at your option) any later version.
CHAR16 TimeoutMessage[256];
CHAR16 KeyAsString[2];
UINTN MenuExit;
-
- EFI_STATUS TouchStatus = EFI_NOT_READY;
- EFI_ABSOLUTE_POINTER_STATE TouchState;
+ EFI_STATUS TouchStatus = EFI_NOT_READY;
+ EFI_ABSOLUTE_POINTER_STATE TouchState;
+ UINT32 TouchScreenPosX;
+ UINT32 TouchScreenPosY;
+ UINTN Item;
if (Screen->TimeoutSeconds > 0) {
HaveTimeout = TRUE;
case ' ':
MenuExit = MENU_EXIT_ENTER;
break;
+ case CHAR_BACKSPACE:
+ MenuExit = MENU_EXIT_ESCAPE;
+ break;
case '+':
+ case CHAR_TAB:
MenuExit = MENU_EXIT_DETAILS;
break;
default:
}
} else { //react to touch event
//the TouchProtocol min/max may not match the screen size
- UINT32 TouchScreenPosX = (TouchState.CurrentX * UGAWidth) / TouchProtocol->Mode->AbsoluteMaxX;
- UINT32 TouchScreenPosY = (TouchState.CurrentY * UGAHeight) / TouchProtocol->Mode->AbsoluteMaxY;
-
- UINTN Item = FindMainMenuItem(Screen, &State, TouchScreenPosX, TouchScreenPosY);
+ TouchScreenPosX = ((UINT32) TouchState.CurrentX * UGAWidth) / (UINT32) TouchProtocol->Mode->AbsoluteMaxX;
+ TouchScreenPosY = ((UINT32) TouchState.CurrentY * UGAHeight) / (UINT32) TouchProtocol->Mode->AbsoluteMaxY;
+ Item = FindMainMenuItem(Screen, &State, TouchScreenPosX, TouchScreenPosY);
switch (Item) {
case TOUCH_NO_ITEM:
//do nothing