1
0
Fork 0
forked from len0rd/rockbox

Sleeptimer now reboots instead of poweroff when charger is attached

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2926 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2002-12-04 12:53:10 +00:00
parent 34351e8251
commit d41942e12f

View file

@ -257,8 +257,16 @@ static void handle_auto_poweroff(void)
{ {
if(TIME_AFTER(current_tick, sleeptimer_endtick)) if(TIME_AFTER(current_tick, sleeptimer_endtick))
{ {
DEBUGF("Sleep timer timeout. Shutting off...\n"); if(charger_is_inserted)
power_off(); {
DEBUGF("Sleep timer timeout. Rebooting...\n");
system_reboot();
}
else
{
DEBUGF("Sleep timer timeout. Shutting off...\n");
power_off();
}
} }
} }
} }