1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2010-05-15 15:03:16 +00:00
parent e34c0593e7
commit 414dad42c5
3 changed files with 17 additions and 1 deletions

View file

@ -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)
{