From 414dad42c59f43919489f45236d57e1b345b8a65 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 15 May 2010 15:03:16 +0000 Subject: 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 --- firmware/drivers/button.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/drivers/button.c') 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,7 +205,11 @@ static void button_tick(void) #endif ) && #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) +#if CONFIG_CHARGING >= CHARGING_MONITOR + !charging_state() && +#else !charger_inserted() && +#endif #endif repeat_count > POWEROFF_COUNT) { -- cgit v1.2.3