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:
parent
0d768a37f9
commit
a5ececcfef
1 changed files with 6 additions and 4 deletions
|
@ -1267,16 +1267,18 @@ void sys_poweroff(void)
|
||||||
logf("sys_poweroff()");
|
logf("sys_poweroff()");
|
||||||
/* If the main thread fails to shut down the system, we will force a
|
/* 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 */
|
power off after an 20 second timeout - 28 seconds if recording */
|
||||||
#if defined(IAUDIO_X5) && !defined (SIMULATOR)
|
|
||||||
if (shutdown_timeout == 0)
|
if (shutdown_timeout == 0)
|
||||||
|
{
|
||||||
|
#if defined(IAUDIO_X5) && !defined (SIMULATOR)
|
||||||
pcf50606_reset_timeout(); /* Reset timer on first attempt only */
|
pcf50606_reset_timeout(); /* Reset timer on first attempt only */
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_RECORDING
|
#ifdef HAVE_RECORDING
|
||||||
if (audio_status() & AUDIO_STATUS_RECORD)
|
if (audio_status() & AUDIO_STATUS_RECORD)
|
||||||
shutdown_timeout += HZ*8;
|
shutdown_timeout += HZ*8;
|
||||||
#endif
|
#endif
|
||||||
|
shutdown_timeout += HZ*20;
|
||||||
|
}
|
||||||
|
|
||||||
shutdown_timeout = HZ*20;
|
|
||||||
queue_post(&button_queue, SYS_POWEROFF, NULL);
|
queue_post(&button_queue, SYS_POWEROFF, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue