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:
Linus Nielsen Feltzing 2005-09-12 11:03:14 +00:00
parent 829f00e688
commit 7dec69dbce

View file

@ -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
}
}