mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-25 12:17:04 +00:00
Fix touch back button code
This commit is contained in:
parent
735dc822ca
commit
f5fcd45a3f
@ -1450,28 +1450,27 @@ static int mui_pointer_tap(void *userdata,
|
||||
unsigned ptr, menu_file_list_cbs_t *cbs,
|
||||
menu_entry_t *entry, unsigned action)
|
||||
{
|
||||
size_t selection, idx;
|
||||
unsigned header_height, width, height, i;
|
||||
bool scroll = false;
|
||||
size_t selection;
|
||||
unsigned width, height;
|
||||
unsigned header_height, i;
|
||||
mui_handle_t *mui = (mui_handle_t*)userdata;
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
if (!mui)
|
||||
return 0;
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
header_height = menu_display_get_header_height();
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
if (y < header_height)
|
||||
{
|
||||
menu_entries_pop_stack(&selection, 0, 1);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
return menu_entry_action(entry, selection, MENU_ACTION_CANCEL);
|
||||
}
|
||||
else if (y > height - mui->tabs_height)
|
||||
{
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
for (i = 0; i <= MUI_SYSTEM_TAB_END; i++)
|
||||
{
|
||||
unsigned tab_width = width / (MUI_SYSTEM_TAB_END + 1);
|
||||
@ -1491,6 +1490,9 @@ static int mui_pointer_tap(void *userdata,
|
||||
}
|
||||
else if (ptr <= (menu_entries_get_size() - 1))
|
||||
{
|
||||
size_t idx;
|
||||
bool scroll = false;
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
if (ptr == selection && cbs && cbs->action_select)
|
||||
return menu_entry_action(entry, selection, MENU_ACTION_SELECT);
|
||||
|
||||
|
@ -850,20 +850,19 @@ static int rgui_pointer_tap(void *data,
|
||||
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_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
header_height = menu_display_get_header_height();
|
||||
size_t selection;
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
|
||||
if (y < header_height)
|
||||
{
|
||||
menu_entries_pop_stack(&selection, 0, 1);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
return menu_entry_action(entry, selection, MENU_ACTION_CANCEL);
|
||||
}
|
||||
else if (ptr <= (menu_entries_get_size() - 1))
|
||||
{
|
||||
size_t idx;
|
||||
bool scroll = false;
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
if (ptr == selection && cbs && cbs->action_select)
|
||||
return menu_entry_action(entry, selection, MENU_ACTION_SELECT);
|
||||
|
||||
|
@ -3221,20 +3221,20 @@ static int xmb_pointer_tap(void *userdata,
|
||||
menu_file_list_cbs_t *cbs,
|
||||
menu_entry_t *entry, unsigned action)
|
||||
{
|
||||
size_t selection, idx;
|
||||
unsigned header_height;
|
||||
bool scroll = false;
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
header_height = menu_display_get_header_height();
|
||||
size_t selection;
|
||||
unsigned header_height = menu_display_get_header_height();
|
||||
|
||||
if (y < header_height)
|
||||
{
|
||||
menu_entries_pop_stack(&selection, 0, 1);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
return menu_entry_action(entry, selection, MENU_ACTION_CANCEL);
|
||||
}
|
||||
else if (ptr <= (menu_entries_get_size() - 1))
|
||||
{
|
||||
size_t idx;
|
||||
bool scroll = false;
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
if (ptr == selection && cbs && cbs->action_select)
|
||||
return menu_entry_action(entry, selection, MENU_ACTION_SELECT);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user