summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-11-03 14:34:57 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-11-03 14:34:57 +0000
commita41041aeb431c259dc79a203821e81b00c63ebe9 (patch)
tree63f42bc3a4141e52f9c7f37396fa20d1ab10e066 /apps/root_menu.c
parent45fa8245eaf3f8d8a2ff95eae7509a9d3af26c3d (diff)
downloadrockbox-a41041aeb431c259dc79a203821e81b00c63ebe9.tar.gz
rockbox-a41041aeb431c259dc79a203821e81b00c63ebe9.tar.bz2
rockbox-a41041aeb431c259dc79a203821e81b00c63ebe9.zip
Remote android button handling (again). do the press/unpress more like other targets (i.e correctly). The DPAD is special in that the press/unpress happens too quickly, so always post it with the BUTTON_REL. This means all keymaps using the dpad need to remember it will always have a BUTTON_REL (which also means they cant do repeats, which are impossible anyway).
Also make the back button go back to the OS home from the rockbox main menu git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28475 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 5a8d40f0b6..a65ceb51b9 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -639,7 +639,15 @@ void root_menu(void)
case GO_TO_ROOT:
if (last_screen != GO_TO_ROOT)
selected = get_selection(last_screen);
+#if (CONFIG_PLATFORM&PLATFORM_ANDROID)
+ /* When we are in the main menu we want the hardware BACK
+ * button to be handled by Android instead of rockbox */
+ android_ignore_back_button(true);
+#endif
next_screen = do_menu(&root_menu_, &selected, NULL, false);
+#if (CONFIG_PLATFORM&PLATFORM_ANDROID)
+ android_ignore_back_button(false);
+#endif
if (next_screen != GO_TO_PREVIOUS)
last_screen = GO_TO_ROOT;
break;