summaryrefslogtreecommitdiffstats
path: root/firmware/drivers/button.c
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2010-05-29 21:54:14 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2010-05-29 21:54:14 +0000
commit1ecb6297a1cd682629c91c0534a17f72493e2a3a (patch)
treef5a7b6605eed76b4f7c03ee2b237763621a2e6b4 /firmware/drivers/button.c
parentbe0aa25aba3e0ea1a0e640fa1b0a249722f5416a (diff)
downloadrockbox-1ecb6297a1cd682629c91c0534a17f72493e2a3a.tar.gz
rockbox-1ecb6297a1cd682629c91c0534a17f72493e2a3a.zip
Commit FS#10887 by me. Change the check for software poweroff to be that the power button is held, not that the power button is held AND that no other button is held. This makes shutting down players with small tightly spaced buttons (Sandisk...) much easier. This also means that combos involving the power button can now potientially power off the player. The H10 and sansas excluding the Fuze use a combo involving power for AB repeat mode. However, the timeout for shutdown is much longer then the long press duration needed for AB repeat, and in practice seems to not be a problem on these players. I've tested this on various players for a long time and bugged other people to try it out, so I think its pretty safe, but if theres problems it can be reverted or keymaps tweaked.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26397 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r--firmware/drivers/button.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 91b8ebd0c3..16c0d2c16a 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -199,7 +199,7 @@ static void button_tick(void)
which doesn't shut down easily with the OFF
key */
#ifdef HAVE_SW_POWEROFF
- if ((btn == POWEROFF_BUTTON
+ if ((btn & POWEROFF_BUTTON
#ifdef RC_POWEROFF_BUTTON
|| btn == RC_POWEROFF_BUTTON
#endif