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:
parent
34351e8251
commit
d41942e12f
1 changed files with 10 additions and 2 deletions
|
|
@ -257,8 +257,16 @@ static void handle_auto_poweroff(void)
|
|||
{
|
||||
if(TIME_AFTER(current_tick, sleeptimer_endtick))
|
||||
{
|
||||
DEBUGF("Sleep timer timeout. Shutting off...\n");
|
||||
power_off();
|
||||
if(charger_is_inserted)
|
||||
{
|
||||
DEBUGF("Sleep timer timeout. Rebooting...\n");
|
||||
system_reboot();
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUGF("Sleep timer timeout. Shutting off...\n");
|
||||
power_off();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue