From b5855fa49c89a70f5901a985dd4ed103febb8b30 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 1 Nov 2015 20:45:29 +0100 Subject: [PATCH] Backport changes to RGUI too --- menu/drivers/rgui.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 4349579915..76b7ea3cb7 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -840,28 +840,28 @@ static int rgui_environ(menu_environ_cb_t type, void *data) return 0; } -static int rgui_pointer_tap(menu_file_list_cbs_t *cbs, +static int rgui_pointer_tap(unsigned x, unsigned y, + unsigned ptr, menu_file_list_cbs_t *cbs, menu_entry_t *entry, unsigned action) { size_t selection, idx; unsigned header_height; bool scroll = false; - menu_input_t *menu_input = menu_input_get_ptr(); menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection); menu_display_ctl(MENU_DISPLAY_CTL_HEADER_HEIGHT, &header_height); - if ((unsigned)menu_input->pointer.start_y < header_height) + if (y < header_height) { menu_entries_pop_stack(&selection, 0); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); } - else if (menu_input->pointer.ptr <= (menu_entries_get_size() - 1)) + else if (ptr <= (menu_entries_get_size() - 1)) { - if (menu_input->pointer.ptr == selection && cbs && cbs->action_select) + if (ptr == selection && cbs && cbs->action_select) return menu_entry_action(entry, selection, MENU_ACTION_SELECT); - idx = menu_input->pointer.ptr; + idx = ptr; menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &idx); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET, &scroll);