- UINTN Item = FindMainMenuItem(Screen, &State, TouchState->CurrentX, TouchState->CurrentY);
+ //the TouchProtocol min/max may not match the screen size
+ TouchScreenPosX = ((UINT32) TouchState.CurrentX * UGAWidth) / (UINT32) TouchProtocol->Mode->AbsoluteMaxX;
+ TouchScreenPosY = ((UINT32) TouchState.CurrentY * UGAHeight) / (UINT32) TouchProtocol->Mode->AbsoluteMaxY;
+ Item = FindMainMenuItem(Screen, &State, TouchScreenPosX, TouchScreenPosY);