summaryrefslogtreecommitdiff
path: root/apps/settings_menu.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-02-14 09:44:34 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-02-14 09:44:34 +0000
commitc4d8d970f6602c80d7362a41da8851dbbf59ae1b (patch)
tree7e8f936eae5c1854c006c4fe134c4c2ce6f91291 /apps/settings_menu.c
parent84706a4188cea193a5a095855c1068b1c31a3875 (diff)
downloadrockbox-c4d8d970f6602c80d7362a41da8851dbbf59ae1b.zip
rockbox-c4d8d970f6602c80d7362a41da8851dbbf59ae1b.tar.gz
rockbox-c4d8d970f6602c80d7362a41da8851dbbf59ae1b.tar.bz2
rockbox-c4d8d970f6602c80d7362a41da8851dbbf59ae1b.tar.xz
The power-saving SLEEP patch by Simon Elén.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3259 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r--apps/settings_menu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index baffb81..37b2b09 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -27,6 +27,7 @@
#include "mpeg.h"
#include "button.h"
#include "kernel.h"
+#include "thread.h"
#include "sprintf.h"
#include "settings.h"
#include "settings_menu.h"
@@ -539,6 +540,13 @@ static bool poweroff(void)
}
#endif
+static bool cpu_sleep_set(void)
+{
+ bool result = set_bool(str(LANG_CPU_SLEEP), &global_settings.cpu_sleep);
+ cpu_sleep(global_settings.cpu_sleep);
+ return result;
+}
+
static bool buffer_margin(void)
{
return set_int(str(LANG_MP3BUFFER_MARGIN), "s",
@@ -731,6 +739,7 @@ static bool system_settings_menu(void)
#ifdef HAVE_ATA_POWER_OFF
{ str(LANG_POWEROFF), poweroff },
#endif
+ { str(LANG_CPU_SLEEP), cpu_sleep_set },
#ifndef SIMULATOR
{ str(LANG_BATTERY_CAPACITY), battery_capacity },
#endif