diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-12-07 19:46:36 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-12-07 19:46:36 +0000 |
commit | a5ececcfef96840921f1d24df1d4adb0b00f8ad3 (patch) | |
tree | 026a8c7c53b94997fc7cc4568d955f226d277360 | |
parent | 0d768a37f970b40575ef2be169e670fd6b5d424a (diff) | |
download | rockbox-a5ececcfef96840921f1d24df1d4adb0b00f8ad3.tar.gz rockbox-a5ececcfef96840921f1d24df1d4adb0b00f8ad3.zip |
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
-rw-r--r-- | firmware/powermgmt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 458745f0d9..90ac492fc8 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -1267,16 +1267,18 @@ void sys_poweroff(void) | |||
1267 | logf("sys_poweroff()"); | 1267 | logf("sys_poweroff()"); |
1268 | /* If the main thread fails to shut down the system, we will force a | 1268 | /* If the main thread fails to shut down the system, we will force a |
1269 | power off after an 20 second timeout - 28 seconds if recording */ | 1269 | power off after an 20 second timeout - 28 seconds if recording */ |
1270 | #if defined(IAUDIO_X5) && !defined (SIMULATOR) | ||
1271 | if (shutdown_timeout == 0) | 1270 | if (shutdown_timeout == 0) |
1271 | { | ||
1272 | #if defined(IAUDIO_X5) && !defined (SIMULATOR) | ||
1272 | pcf50606_reset_timeout(); /* Reset timer on first attempt only */ | 1273 | pcf50606_reset_timeout(); /* Reset timer on first attempt only */ |
1273 | #endif | 1274 | #endif |
1274 | #ifdef HAVE_RECORDING | 1275 | #ifdef HAVE_RECORDING |
1275 | if (audio_status() & AUDIO_STATUS_RECORD) | 1276 | if (audio_status() & AUDIO_STATUS_RECORD) |
1276 | shutdown_timeout += HZ*8; | 1277 | shutdown_timeout += HZ*8; |
1277 | #endif | 1278 | #endif |
1279 | shutdown_timeout += HZ*20; | ||
1280 | } | ||
1278 | 1281 | ||
1279 | shutdown_timeout = HZ*20; | ||
1280 | queue_post(&button_queue, SYS_POWEROFF, NULL); | 1282 | queue_post(&button_queue, SYS_POWEROFF, NULL); |
1281 | } | 1283 | } |
1282 | 1284 | ||