summaryrefslogtreecommitdiffstats
path: root/apps/menu.c
diff options
context:
space:
mode:
authorJohannes Schwarz <ubuntuxer@rockbox.org>2009-06-26 17:59:33 +0000
committerJohannes Schwarz <ubuntuxer@rockbox.org>2009-06-26 17:59:33 +0000
commit73d25744fb01844cc28402dfc4b48a030d270579 (patch)
tree34a3e43d7160f263178928553644cf3392a6341b /apps/menu.c
parentc2565c9bcf02b8b9fe0311a15a731dde449c1552 (diff)
downloadrockbox-73d25744fb01844cc28402dfc4b48a030d270579.tar.gz
rockbox-73d25744fb01844cc28402dfc4b48a030d270579.tar.bz2
rockbox-73d25744fb01844cc28402dfc4b48a030d270579.zip
FS#10283 simplify plugins' menus by using stringlist with callback (by Teruaki Kawashima - some minor changes by myself)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21523 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/menu.c b/apps/menu.c
index c49650d941..653dc09aec 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -81,7 +81,8 @@ static void get_menu_callback(const struct menu_item_ex *m,
static int get_menu_selection(int selected_item, const struct menu_item_ex *menu)
{
int type = (menu->flags&MENU_TYPE_MASK);
- if (type == MT_MENU && (selected_item<current_subitems_count))
+ if ((type == MT_MENU || type == MT_RETURN_ID)
+ && (selected_item<current_subitems_count))
return current_subitems[selected_item];
return selected_item;
}