diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-26 21:31:47 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-26 21:31:47 +0000 |
commit | d1d752554b3976fd6f6956eb1ddcbd415a2260f6 (patch) | |
tree | ba56b2e33bf97bf28c3459a08ca5e45151e3daee | |
parent | 2dd9b33977606c9441791cb2f56dad5df8d3dd0c (diff) |
Bug 574204 fixed. Now reboots when OFF is pressed while charging.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1207 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/button.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index bd54dba523..7f680c6643 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -23,6 +23,7 @@ #include <stdlib.h> #include "config.h" #include "sh7034.h" +#include "system.h" #include "button.h" #include "kernel.h" #include "backlight.h" @@ -64,6 +65,14 @@ static void button_tick(void) post = true; repeat = true; count = REPEAT_INTERVAL; +#ifdef HAVE_RECORDER_KEYPAD + /* If the OFF button is pressed long enough, and we are + still alive, then the unit must be connected to a + charger. Therefore we will reboot and let the original + firmware handle the charging. */ + if(btn == BUTTON_OFF) + system_reboot(); +#endif } } if ( post ) |