diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-07-11 02:22:03 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-07-11 02:22:03 +0000 |
| commit | 411f3e2b2bb8ad93e9402bd90aba1894ecf25076 (patch) | |
| tree | ab7426f6180753cb3afbb00fe73ac60de4f6d4a1 /apps/menu.c | |
| parent | b9f22af85a04cc89913090a9d145ead055f38b43 (diff) | |
| download | rockbox-411f3e2b2bb8ad93e9402bd90aba1894ecf25076.zip rockbox-411f3e2b2bb8ad93e9402bd90aba1894ecf25076.tar.gz rockbox-411f3e2b2bb8ad93e9402bd90aba1894ecf25076.tar.bz2 rockbox-411f3e2b2bb8ad93e9402bd90aba1894ecf25076.tar.xz | |
If the action handler for the menu returns ACTION_REDRAW the list will be redrawn. Fixes the Now Playing/Resume Playback text not updating
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13848 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
| -rw-r--r-- | apps/menu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/menu.c b/apps/menu.c index 5386353..9a35af8 100644 --- a/apps/menu.c +++ b/apps/menu.c @@ -382,6 +382,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) struct gui_synclist lists; const struct menu_item_ex *temp, *menu; int ret = 0; + bool redraw_lists; #ifdef HAS_BUTTONBAR struct gui_buttonbar buttonbar; #endif @@ -415,6 +416,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) while (!done) { talk_item = false; + redraw_lists = false; gui_syncstatusbar_draw(&statusbars, true); action = get_action(CONTEXT_MAINMENU,HZ); /* HZ so the status bar redraws corectly */ @@ -433,6 +435,11 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) ret = MENU_SELECTED_EXIT; /* will exit after returning from selection */ } + else if (action == ACTION_REDRAW) + { + action = old_action; + redraw_lists = true; + } } if (gui_synclist_do_button(&lists,action,LIST_WRAP_UNLESS_HELD)) @@ -603,6 +610,9 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected) } if (talk_item && !done) talk_menu_item(menu, &lists); + + if (redraw_lists) + gui_synclist_draw(&lists); } action_signalscreenchange(); if (start_selected) |