summaryrefslogtreecommitdiffstats
path: root/apps/menu.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-07-11 14:04:34 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-07-11 14:04:34 +0000
commitb1f5e5688c9ccc94cf2767d045b20df33b8a3d9d (patch)
tree218701a7df562d23c6fe59bfdb88d8364ee3b475 /apps/menu.c
parent911ed00171aba31a7672aed6f3bddbf3572337e1 (diff)
downloadrockbox-b1f5e5688c9ccc94cf2767d045b20df33b8a3d9d.tar.gz
rockbox-b1f5e5688c9ccc94cf2767d045b20df33b8a3d9d.tar.bz2
rockbox-b1f5e5688c9ccc94cf2767d045b20df33b8a3d9d.zip
do not redraw menu when exiting the menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27383 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 670a235202..a88d725774 100644
--- a/apps/menu.c
+++ b/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;