diff options
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r-- | apps/settings_menu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index baffb81926..37b2b094a7 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "mpeg.h" | 27 | #include "mpeg.h" |
28 | #include "button.h" | 28 | #include "button.h" |
29 | #include "kernel.h" | 29 | #include "kernel.h" |
30 | #include "thread.h" | ||
30 | #include "sprintf.h" | 31 | #include "sprintf.h" |
31 | #include "settings.h" | 32 | #include "settings.h" |
32 | #include "settings_menu.h" | 33 | #include "settings_menu.h" |
@@ -539,6 +540,13 @@ static bool poweroff(void) | |||
539 | } | 540 | } |
540 | #endif | 541 | #endif |
541 | 542 | ||
543 | static bool cpu_sleep_set(void) | ||
544 | { | ||
545 | bool result = set_bool(str(LANG_CPU_SLEEP), &global_settings.cpu_sleep); | ||
546 | cpu_sleep(global_settings.cpu_sleep); | ||
547 | return result; | ||
548 | } | ||
549 | |||
542 | static bool buffer_margin(void) | 550 | static bool buffer_margin(void) |
543 | { | 551 | { |
544 | return set_int(str(LANG_MP3BUFFER_MARGIN), "s", | 552 | return set_int(str(LANG_MP3BUFFER_MARGIN), "s", |
@@ -731,6 +739,7 @@ static bool system_settings_menu(void) | |||
731 | #ifdef HAVE_ATA_POWER_OFF | 739 | #ifdef HAVE_ATA_POWER_OFF |
732 | { str(LANG_POWEROFF), poweroff }, | 740 | { str(LANG_POWEROFF), poweroff }, |
733 | #endif | 741 | #endif |
742 | { str(LANG_CPU_SLEEP), cpu_sleep_set }, | ||
734 | #ifndef SIMULATOR | 743 | #ifndef SIMULATOR |
735 | { str(LANG_BATTERY_CAPACITY), battery_capacity }, | 744 | { str(LANG_BATTERY_CAPACITY), battery_capacity }, |
736 | #endif | 745 | #endif |