summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-11-25 17:36:21 +0000
committerJens Arnold <amiconn@rockbox.org>2007-11-25 17:36:21 +0000
commitd490f441126542f961da4132b59d843140709b3e (patch)
treeef1c0e0cf4b5cd453d01101432990a02d8ba88a9 /apps/gui/gwps-common.c
parent54ecc698a54cf0b30dfda243ff149a1c6858e0f2 (diff)
downloadrockbox-d490f441126542f961da4132b59d843140709b3e.tar.gz
rockbox-d490f441126542f961da4132b59d843140709b3e.zip
New way of handling integer settings with variable steps: table settings (FS #8186, with fixes by me). This allows to get rid of those synchronised tables in firmware/ and apps/, making things more flexible and less error prone. First application: backlight timeouts. * Make some more things 'const'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15803 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 8491a6dc5f..ee0bc3bdb4 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -2009,8 +2009,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
2009 { 2009 {
2010 /* turn on backlight n seconds before track ends, and turn it off n 2010 /* turn on backlight n seconds before track ends, and turn it off n
2011 seconds into the new track. n == backlight_timeout, or 5s */ 2011 seconds into the new track. n == backlight_timeout, or 5s */
2012 int n = backlight_timeout_value[global_settings.backlight_timeout] 2012 int n = global_settings.backlight_timeout * 1000;
2013 * 1000;
2014 2013
2015 if ( n < 1000 ) 2014 if ( n < 1000 )
2016 n = 5000; /* use 5s if backlight is always on or off */ 2015 n = 5000; /* use 5s if backlight is always on or off */
@@ -2027,8 +2026,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
2027 /* turn on remote backlight n seconds before track ends, and turn it 2026 /* turn on remote backlight n seconds before track ends, and turn it
2028 off n seconds into the new track. n == remote_backlight_timeout, 2027 off n seconds into the new track. n == remote_backlight_timeout,
2029 or 5s */ 2028 or 5s */
2030 int n = backlight_timeout_value[global_settings.remote_backlight_timeout] 2029 int n = global_settings.remote_backlight_timeout * 1000;
2031 * 1000;
2032 2030
2033 if ( n < 1000 ) 2031 if ( n < 1000 )
2034 n = 5000; /* use 5s if backlight is always on or off */ 2032 n = 5000; /* use 5s if backlight is always on or off */