1
0
Fork 0
forked from len0rd/rockbox

Oops, that'll just keep resetting the timeout to 20s every time sys_poweroff is called and won't add the 8s recording margin.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11686 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2006-12-07 19:46:36 +00:00
parent 0d768a37f9
commit a5ececcfef

View file

@ -1267,16 +1267,18 @@ void sys_poweroff(void)
logf("sys_poweroff()");
/* If the main thread fails to shut down the system, we will force a
power off after an 20 second timeout - 28 seconds if recording */
#if defined(IAUDIO_X5) && !defined (SIMULATOR)
if (shutdown_timeout == 0)
{
#if defined(IAUDIO_X5) && !defined (SIMULATOR)
pcf50606_reset_timeout(); /* Reset timer on first attempt only */
#endif
#ifdef HAVE_RECORDING
if (audio_status() & AUDIO_STATUS_RECORD)
shutdown_timeout += HZ*8;
if (audio_status() & AUDIO_STATUS_RECORD)
shutdown_timeout += HZ*8;
#endif
shutdown_timeout += HZ*20;
}
shutdown_timeout = HZ*20;
queue_post(&button_queue, SYS_POWEROFF, NULL);
}