Skip to content

Commit

Permalink
GLUI: Fix menu back to switch tabs like other drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
sonninnos committed Feb 7, 2025
1 parent 3f70ac5 commit c674a05
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions menu/drivers/materialui.c
Original file line number Diff line number Diff line change
Expand Up @@ -9466,8 +9466,7 @@ static enum menu_action materialui_parse_menu_entry_action(
* user instigates a cancel action from any top
* level menu other than main *if* the navigation
* bar is hidden */
if ( (mui->nav_bar.location == MUI_NAV_BAR_LOCATION_HIDDEN)
&& (materialui_list_get_size(mui, MENU_LIST_PLAIN) == 1))
if (materialui_list_get_size(mui, MENU_LIST_PLAIN) == 1)
{
size_t i;
size_t main_menu_tab_index = 0;
Expand All @@ -9489,6 +9488,9 @@ static enum menu_action materialui_parse_menu_entry_action(
{
materialui_switch_tabs(mui, main_menu_tab, MENU_ACTION_NOOP);
new_action = MENU_ACTION_NOOP;
#ifdef HAVE_AUDIOMIXER
audio_driver_mixer_play_menu_sound(AUDIO_MIXER_SYSTEM_SLOT_CANCEL);
#endif
}
else if (main_menu_tab_index == mui->nav_bar.active_menu_tab_index)
{
Expand All @@ -9497,12 +9499,6 @@ static enum menu_action materialui_parse_menu_entry_action(
materialui_navigation_set(mui, true);
}
}
else if (materialui_list_get_size(mui, MENU_LIST_PLAIN) == 1)
{
/* Jump to first item on current menu */
menu_st->selection_ptr = 0;
materialui_navigation_set(mui, true);
}
break;
default:
/* In all other cases, pass through input
Expand Down

0 comments on commit c674a05

Please sign in to comment.