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 9794568..1795f78 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -2051,10 +2051,18 @@ bool set_int(const unsigned char* string,
int max,
void (*formatter)(char*, int, int, const char*) )
{
+#if CONFIG_KEYPAD != PLAYER_PAD
struct value_setting_data data = {
INT,max, step, voice_unit,unit,formatter,NULL };
return do_set_setting(string,variable,(max-min)/step + 1,
(max-*variable)/step, &data,function);
+#else
+ int count = (max-min)/step + 1;
+ struct value_setting_data data = {
+ INT,min, -step, voice_unit,unit,formatter,NULL };
+ return do_set_setting(string,variable,count,
+ count - ((max-*variable)/step), &data,function);
+#endif
}
/* NOTE: the 'type' parameter specifies the actual type of the variable