do not redraw menu when exiting the menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27383 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
911ed00171
commit
b1f5e5688c
1 changed files with 5 additions and 11 deletions
16
apps/menu.c
16
apps/menu.c
|
@ -224,8 +224,6 @@ static void init_menu_lists(const struct menu_item_ex *menu,
|
|||
get_menu_callback(menu,&menu_callback);
|
||||
if (callback && menu_callback)
|
||||
menu_callback(ACTION_ENTER_MENUITEM,menu);
|
||||
gui_synclist_draw(lists);
|
||||
gui_synclist_speak_item(lists);
|
||||
}
|
||||
|
||||
static int talk_menu_item(int selected_item, void *data)
|
||||
|
@ -365,12 +363,14 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
|
||||
/* if hide_theme is true, assume parent has been fixed before passed into
|
||||
* this function, e.g. with viewport_set_defaults(parent, screen) */
|
||||
init_menu_lists(menu, &lists, selected, true, parent);
|
||||
init_menu_lists(menu, &lists, selected, true, parent);
|
||||
vps = *(lists.parent);
|
||||
in_stringlist = ((menu->flags&MENU_TYPE_MASK) == MT_RETURN_ID);
|
||||
/* load the callback, and only reload it if menu changes */
|
||||
get_menu_callback(menu, &menu_callback);
|
||||
|
||||
gui_synclist_draw(&lists);
|
||||
gui_synclist_speak_item(&lists);
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (!hide_theme)
|
||||
{
|
||||
|
@ -528,6 +528,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
else
|
||||
init_menu_lists(menu, &lists,
|
||||
menu_stack_selected_item[stack_top], false, vps);
|
||||
redraw_lists = true;
|
||||
/* new menu, so reload the callback */
|
||||
get_menu_callback(menu, &menu_callback);
|
||||
}
|
||||
|
@ -573,9 +574,8 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
menu_stack[stack_top] = menu;
|
||||
menu_stack_selected_item[stack_top] = selected;
|
||||
stack_top++;
|
||||
init_menu_lists(temp, &lists, 0, true, vps);
|
||||
redraw_lists = false; /* above does the redraw */
|
||||
menu = temp;
|
||||
init_menu_lists(menu, &lists, 0, true, vps);
|
||||
}
|
||||
break;
|
||||
case MT_FUNCTION_CALL:
|
||||
|
@ -586,11 +586,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
temp->function->param);
|
||||
else
|
||||
return_value = temp->function->function();
|
||||
if (!(menu->flags&MENU_EXITAFTERTHISMENU) ||
|
||||
(temp->flags&MENU_EXITAFTERTHISMENU))
|
||||
{
|
||||
init_menu_lists(menu, &lists, selected, true, vps);
|
||||
}
|
||||
if (temp->flags&MENU_FUNC_CHECK_RETVAL)
|
||||
{
|
||||
if (return_value != 0)
|
||||
|
@ -621,7 +616,6 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
stack_top++;
|
||||
menu = temp;
|
||||
init_menu_lists(menu,&lists,0,false, vps);
|
||||
redraw_lists = false; /* above does the redraw */
|
||||
in_stringlist = true;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue