Safety net for devices with no hardware poweroff mechanism - hold STOP for several seconds to force a poweroff if the normal shutdown fails
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7512 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
829f00e688
commit
7dec69dbce
1 changed files with 7 additions and 0 deletions
|
@ -131,7 +131,14 @@ static void button_tick(void)
|
|||
!charger_inserted() &&
|
||||
#endif
|
||||
repeat_count > POWEROFF_COUNT)
|
||||
{
|
||||
queue_post(&button_queue, SYS_POWEROFF, NULL);
|
||||
|
||||
/* Safety net for players without hardware
|
||||
poweroff */
|
||||
if(repeat_count > POWEROFF_COUNT * 10)
|
||||
power_off();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue