X-Git-Url: https://code.delx.au/refind/blobdiff_plain/874e66c90f7dc2da834032a46b3db3e5295aa16a..76f5e60d25a0c4768bc6c3d5fb1344def1c0dcdc:/refind/menu.c?ds=sidebyside diff --git a/refind/menu.c b/refind/menu.c index 4191e5d..08abe3e 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -34,7 +34,7 @@ * 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. @@ -600,7 +600,11 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty case ' ': MenuExit = MENU_EXIT_ENTER; break; + case CHAR_BACKSPACE: + MenuExit = MENU_EXIT_ESCAPE; + break; case '+': + case CHAR_TAB: MenuExit = MENU_EXIT_DETAILS; break; default: @@ -614,7 +618,12 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty break; } } else { //react to touch event - 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); switch (Item) { case TOUCH_NO_ITEM: //do nothing