summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorNick Peskett <rockbox@peskett.co.uk>2011-12-26 09:57:55 +0000
committerNick Peskett <rockbox@peskett.co.uk>2011-12-26 09:57:55 +0000
commit3074b64025e474bb1943b58d76ebf471d89fdbbf (patch)
tree188ca37803779e09a724eba1797a1cc3360e9812 /apps
parentfdcf5e48e1221ca8575170269dcfd31fd6869152 (diff)
downloadrockbox-3074b64025e474bb1943b58d76ebf471d89fdbbf.tar.gz
rockbox-3074b64025e474bb1943b58d76ebf471d89fdbbf.tar.bz2
rockbox-3074b64025e474bb1943b58d76ebf471d89fdbbf.zip
Moved initial checking of sleeptimer_on_startup from root_menu.c to settings.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31439 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/root_menu.c3
-rw-r--r--apps/settings.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index aaddfa885a..747ba76c24 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -664,9 +664,6 @@ void root_menu(void)
next_screen = GO_TO_ROOT;
#endif
- if (global_settings.sleeptimer_on_startup)
- set_sleep_timer(global_settings.sleeptimer_duration * 60);
-
while (true)
{
switch (next_screen)
diff --git a/apps/settings.c b/apps/settings.c
index 39390f408e..13913f2d85 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -844,6 +844,8 @@ void settings_apply(bool read_disk)
dac_line_in(global_settings.line_in);
#endif
set_poweroff_timeout(global_settings.poweroff);
+ if (global_settings.sleeptimer_on_startup)
+ set_sleep_timer(global_settings.sleeptimer_duration * 60);
set_keypress_restarts_sleep_timer(
global_settings.keypress_restarts_sleeptimer);