summaryrefslogtreecommitdiffstats
path: root/apps/menu.c
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2010-04-01 03:14:44 +0000
committerJeffrey Goode <jeffg7@gmail.com>2010-04-01 03:14:44 +0000
commitd5e6bc7a8c413218ec1372fd54157e9639ab67b4 (patch)
tree2be93c700ef9c5e8f85cc7dbbfab7f9f842c92f0 /apps/menu.c
parent39e78993f317349dacfc4e8d1abb703117636696 (diff)
downloadrockbox-d5e6bc7a8c413218ec1372fd54157e9639ab67b4.tar.gz
rockbox-d5e6bc7a8c413218ec1372fd54157e9639ab67b4.tar.bz2
rockbox-d5e6bc7a8c413218ec1372fd54157e9639ab67b4.zip
FS#11081 - Hotkey patch. Many targets supported, but some keymaps need work before they can be switched on
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25414 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 670a235202..b640905c0f 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -61,6 +61,12 @@
#include "list.h"
#include "buttonbar.h"
+/* hotkey settings */
+#ifdef HAVE_HOTKEY
+const struct menu_item_ex *selected_menu_item;
+bool hotkey_settable_menu = false;
+#endif
+
#define MAX_MENUS 8
/* used to allow for dynamic menus */
#define MAX_MENU_SUBITEMS 64
@@ -426,6 +432,17 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
done = true;
}
#endif
+#ifdef HAVE_HOTKEY
+ else if (hotkey_settable_menu &&
+ ((action == ACTION_WPS_HOTKEY) ||
+ (action == ACTION_TREE_HOTKEY)))
+ {
+ ret = MENU_SELECTED_HOTKEY;
+ done = true;
+ selected = get_menu_selection(gui_synclist_get_sel_pos(&lists),menu);
+ selected_menu_item = menu->submenus[selected];
+ }
+#endif
else if (action == ACTION_TREE_WPS)
{
ret = GO_TO_PREVIOUS_MUSIC;