diff options
-rw-r--r-- | apps/misc.c | 4 | ||||
-rw-r--r-- | apps/settings_list.c | 44 |
2 files changed, 25 insertions, 23 deletions
diff --git a/apps/misc.c b/apps/misc.c index 9b8fa3e81c..c93bf3caf3 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -1111,7 +1111,7 @@ char* skip_whitespace(char* const str) return s; } - +#ifndef CHECKWPS /* time_split_units() split time values depending on base unit unit_idx: UNIT_HOUR, UNIT_MIN, UNIT_SEC, UNIT_MS @@ -1337,7 +1337,7 @@ void format_time(char* buf, int buf_size, long t) t < 0, "-", units_in[UNIT_IDX_HR], hashours, ":", hashours+1, units_in[UNIT_IDX_MIN], units_in[UNIT_IDX_SEC]); } - +#endif /* !defined(CHECKWPS) */ /** * Splits str at each occurence of split_char and puts the substrings into vector, * but at most vector_lenght items. Empty substrings are ignored. diff --git a/apps/settings_list.c b/apps/settings_list.c index a5a1c53dc0..eb3c76865d 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -379,24 +379,6 @@ static int32_t list_pad_getlang(int value, int unit) } #endif -static const char* formatter_unit_0_is_off(char *buffer, size_t buffer_size, - int val, const char *unit) -{ - if (val == 0) - return str(LANG_OFF); - else - snprintf(buffer, buffer_size, "%d %s", val, unit); - return buffer; -} - -static int32_t getlang_unit_0_is_off(int value, int unit) -{ - if (value == 0) - return LANG_OFF; - else - return TALK_ID(value,unit); -} - static const char* formatter_time_unit_0_is_off(char *buffer, size_t buffer_size, int val, const char *unit) { @@ -495,6 +477,25 @@ static const char* scanaccel_formatter(char *buffer, size_t buffer_size, #endif #if CONFIG_CODEC == SWCODEC + +static const char* formatter_unit_0_is_off(char *buffer, size_t buffer_size, + int val, const char *unit) +{ + if (val == 0) + return str(LANG_OFF); + else + snprintf(buffer, buffer_size, "%d %s", val, unit); + return buffer; +} + +static int32_t getlang_unit_0_is_off(int value, int unit) +{ + if (value == 0) + return LANG_OFF; + else + return TALK_ID(value,unit); +} + static void crossfeed_cross_set(int val) { (void)val; @@ -1158,7 +1159,7 @@ const struct settings_list settings[] = { #if defined(HAVE_BACKLIGHT_FADING_INT_SETTING) TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, backlight_fade_in, LANG_BACKLIGHT_FADE_IN, 300, "backlight fade in", "off", - UNIT_MS, formatter_time_unit_0_is_off, getlang_unit_0_is_off, + UNIT_MS, formatter_time_unit_0_is_off, getlang_time_unit_0_is_off, backlight_set_fade_in, 7, backlight_fade), TABLE_SETTING_LIST(F_TIME_SETTING | F_ALLOW_ARBITRARY_VALS, backlight_fade_out, LANG_BACKLIGHT_FADE_OUT, 2000, "backlight fade out", "off", @@ -1791,7 +1792,8 @@ const struct settings_list settings[] = { LANG_COMPRESSOR_RELEASE, 500, "compressor release time", UNIT_MS, 100, 1000, 100, NULL, NULL, compressor_set), -#endif +#endif /* CONFIG_CODEC == SWCODEC */ + #ifdef AUDIOHW_HAVE_BASS_CUTOFF SOUND_SETTING(F_NO_WRAP, bass_cutoff, LANG_BASS_CUTOFF, "bass cutoff", SOUND_BASS_CUTOFF), @@ -2064,7 +2066,7 @@ const struct settings_list settings[] = { formatter_time_unit_0_is_off, getlang_time_unit_0_is_off, NULL), INT_SETTING(0, list_accel_wait, LANG_LISTACCEL_ACCEL_SPEED, 3, "list_accel_wait", UNIT_SEC, 1, 10, 1, - scanaccel_formatter, getlang_unit_0_is_off, NULL), + scanaccel_formatter, NULL, NULL), #endif /* HAVE_WHEEL_ACCELERATION */ #if CONFIG_CODEC == SWCODEC /* keyclick */ |