diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-05-15 15:03:16 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-05-15 15:03:16 +0000 |
commit | 414dad42c59f43919489f45236d57e1b345b8a65 (patch) | |
tree | 1b29c055a2a8a646fca4412b2167ae39347dfc19 /firmware/drivers/button.c | |
parent | e34c0593e7d859270695af08b2efc8b1e42e4473 (diff) | |
download | rockbox-414dad42c59f43919489f45236d57e1b345b8a65.tar.gz rockbox-414dad42c59f43919489f45236d57e1b345b8a65.zip |
If HAVE_POWEROFF_WHILE_CHARGING is not defined and the charging configuration specifies CHARGING_MONITOR or greater, allow poweroff while plugged but not actually charging the battery.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26055 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r-- | firmware/drivers/button.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index f7523d776c..100957b77a 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -205,8 +205,12 @@ static void button_tick(void) | |||
205 | #endif | 205 | #endif |
206 | ) && | 206 | ) && |
207 | #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) | 207 | #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) |
208 | #if CONFIG_CHARGING >= CHARGING_MONITOR | ||
209 | !charging_state() && | ||
210 | #else | ||
208 | !charger_inserted() && | 211 | !charger_inserted() && |
209 | #endif | 212 | #endif |
213 | #endif | ||
210 | repeat_count > POWEROFF_COUNT) | 214 | repeat_count > POWEROFF_COUNT) |
211 | { | 215 | { |
212 | /* Tell the main thread that it's time to | 216 | /* Tell the main thread that it's time to |