diff options
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r-- | apps/settings_list.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c index 7c5552a031..521d565f3b 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -549,6 +549,13 @@ static void tsc_set_default(void* setting, void* defaultval) | |||
549 | memcpy(setting, defaultval, sizeof(struct touchscreen_parameter)); | 549 | memcpy(setting, defaultval, sizeof(struct touchscreen_parameter)); |
550 | } | 550 | } |
551 | #endif | 551 | #endif |
552 | static const char* sleeptimer_formatter(char* buffer, size_t buffer_size, | ||
553 | int value, const char* unit) | ||
554 | { | ||
555 | (void) unit; | ||
556 | snprintf(buffer, buffer_size, "%d:%02d", value / 60, value % 60); | ||
557 | return buffer; | ||
558 | } | ||
552 | #ifdef HAVE_HOTKEY | 559 | #ifdef HAVE_HOTKEY |
553 | static const char* hotkey_formatter(char* buffer, size_t buffer_size, int value, | 560 | static const char* hotkey_formatter(char* buffer, size_t buffer_size, int value, |
554 | const char* unit) | 561 | const char* unit) |
@@ -1759,6 +1766,11 @@ const struct settings_list settings[] = { | |||
1759 | #endif /* CONFIG_CODEC == SWCODEC */ | 1766 | #endif /* CONFIG_CODEC == SWCODEC */ |
1760 | TEXT_SETTING(0, playlist_catalog_dir, "playlist catalog directory", | 1767 | TEXT_SETTING(0, playlist_catalog_dir, "playlist catalog directory", |
1761 | PLAYLIST_CATALOG_DEFAULT_DIR, NULL, NULL), | 1768 | PLAYLIST_CATALOG_DEFAULT_DIR, NULL, NULL), |
1769 | INT_SETTING(0, sleeptimer_duration, LANG_SLEEP_TIMER_DURATION, 30, | ||
1770 | "sleeptimer duration", | ||
1771 | UNIT_MIN, 5, 300, 5, sleeptimer_formatter, NULL, NULL), | ||
1772 | OFFON_SETTING(0, sleeptimer_on_startup, LANG_SLEEP_TIMER_ON_POWER_UP, false, | ||
1773 | "sleeptimer on startup", NULL), | ||
1762 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING | 1774 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING |
1763 | CHOICE_SETTING(0, touchpad_sensitivity, LANG_TOUCHPAD_SENSITIVITY, 0, | 1775 | CHOICE_SETTING(0, touchpad_sensitivity, LANG_TOUCHPAD_SENSITIVITY, 0, |
1764 | "touchpad sensitivity", "normal,high", touchpad_set_sensitivity, 2, | 1776 | "touchpad sensitivity", "normal,high", touchpad_set_sensitivity, 2, |