summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/menu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/menu.c b/apps/menu.c
index e29b9c4e76..f61acd076b 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -569,10 +569,11 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
temp->function->param);
else
return_value = temp->function->function();
-
- init_default_menu_viewports(menu_vp, hide_bars);
- init_menu_lists(menu, &lists, selected, true, vps);
-
+ if (!(menu->flags&MENU_EXITAFTERTHISMENU) || (temp->flags&MENU_EXITAFTERTHISMENU))
+ {
+ init_default_menu_viewports(menu_vp, hide_bars);
+ init_menu_lists(menu, &lists, selected, true, vps);
+ }
if (temp->flags&MENU_FUNC_CHECK_RETVAL)
{
if (return_value == 1)