Shortcuts: Fix return to wrong menu
Rockbox would go to a previously selected menu instead of returning to the current one when leaving the Shortcuts screen. Change-Id: I3546e32def9124956cd9edc258e14db91d19fa22
This commit is contained in:
parent
8cbe5c95a9
commit
51c1e3ce7f
2 changed files with 15 additions and 3 deletions
11
apps/menu.c
11
apps/menu.c
|
@ -458,9 +458,16 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
||||||
if (global_settings.shortcuts_replaces_qs ||
|
if (global_settings.shortcuts_replaces_qs ||
|
||||||
quick_screen_quick(action) == QUICKSCREEN_GOTO_SHORTCUTS_MENU)
|
quick_screen_quick(action) == QUICKSCREEN_GOTO_SHORTCUTS_MENU)
|
||||||
{
|
{
|
||||||
|
int last_screen = global_status.last_screen;
|
||||||
global_status.last_screen = GO_TO_SHORTCUTMENU;
|
global_status.last_screen = GO_TO_SHORTCUTMENU;
|
||||||
ret = do_shortcut_menu(NULL);
|
int shortcut_ret = do_shortcut_menu(NULL);
|
||||||
done = true;
|
if (shortcut_ret == GO_TO_PREVIOUS)
|
||||||
|
global_status.last_screen = last_screen;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret = shortcut_ret;
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
redraw_lists = true;
|
redraw_lists = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -766,8 +766,13 @@ static int dirbrowse(void)
|
||||||
|
|
||||||
if (enter_shortcuts_menu && *tc.dirfilter < NUM_FILTER_MODES)
|
if (enter_shortcuts_menu && *tc.dirfilter < NUM_FILTER_MODES)
|
||||||
{
|
{
|
||||||
|
int last_screen = global_status.last_screen;
|
||||||
global_status.last_screen = GO_TO_SHORTCUTMENU;
|
global_status.last_screen = GO_TO_SHORTCUTMENU;
|
||||||
return do_shortcut_menu(NULL);
|
int shortcut_ret = do_shortcut_menu(NULL);
|
||||||
|
if (shortcut_ret == GO_TO_PREVIOUS)
|
||||||
|
global_status.last_screen = last_screen;
|
||||||
|
else
|
||||||
|
return shortcut_ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
restore = true;
|
restore = true;
|
||||||
|
|
Loading…
Reference in a new issue