summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 97945682df..1795f78cf7 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -2051,10 +2051,18 @@ bool set_int(const unsigned char* string,
2051 int max, 2051 int max,
2052 void (*formatter)(char*, int, int, const char*) ) 2052 void (*formatter)(char*, int, int, const char*) )
2053{ 2053{
2054#if CONFIG_KEYPAD != PLAYER_PAD
2054 struct value_setting_data data = { 2055 struct value_setting_data data = {
2055 INT,max, step, voice_unit,unit,formatter,NULL }; 2056 INT,max, step, voice_unit,unit,formatter,NULL };
2056 return do_set_setting(string,variable,(max-min)/step + 1, 2057 return do_set_setting(string,variable,(max-min)/step + 1,
2057 (max-*variable)/step, &data,function); 2058 (max-*variable)/step, &data,function);
2059#else
2060 int count = (max-min)/step + 1;
2061 struct value_setting_data data = {
2062 INT,min, -step, voice_unit,unit,formatter,NULL };
2063 return do_set_setting(string,variable,count,
2064 count - ((max-*variable)/step), &data,function);
2065#endif
2058} 2066}
2059 2067
2060/* NOTE: the 'type' parameter specifies the actual type of the variable 2068/* NOTE: the 'type' parameter specifies the actual type of the variable