summaryrefslogtreecommitdiffstats
path: root/apps/menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-11-04 12:10:41 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-11-04 12:10:41 +0000
commit62decc42e7f6752d786090277ac4b7f2d2036ad4 (patch)
tree765ec35a93063dfd7503430ee30ec6f631978c9e /apps/menu.c
parent4ada9ed2d9f4e1161ed2a9f8937d1e42e90d23df (diff)
downloadrockbox-62decc42e7f6752d786090277ac4b7f2d2036ad4.tar.gz
rockbox-62decc42e7f6752d786090277ac4b7f2d2036ad4.tar.bz2
rockbox-62decc42e7f6752d786090277ac4b7f2d2036ad4.zip
return to the main menu if stop is pressed in the wps context menu, (blame pondlife for the hack :D )
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15457 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 35b2527cce..f9a2f3c45c 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -291,6 +291,12 @@ bool do_setting_from_menu(const struct menu_item_ex *temp)
return false;
}
+/* HACK ALERT: this is needed so pressing stop in the wps context menu returns to
+ the main menu as it is expected. otherwise there can be nasty side-effects
+ if any of the items are selected. */
+extern const struct menu_item_ex wps_onplay_menu;
+
+/* display a menu */
int do_menu(const struct menu_item_ex *start_menu, int *start_selected)
{
int selected = start_selected? *start_selected : 0;
@@ -369,6 +375,12 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected)
else if (action == ACTION_TREE_STOP)
{
redraw_lists = list_stop_handler();
+ /*return to the main menu if stop is pressed in the WPS context menu */
+ if (menu == &wps_onplay_menu)
+ {
+ ret = GO_TO_ROOT;
+ done = true;
+ }
}
else if (action == ACTION_STD_CONTEXT &&
menu == &root_menu_)