- UINTN Item = FindMainMenuItem(Screen, &State, TouchState.CurrentX, TouchState.CurrentY);
+ //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);