summaryrefslogtreecommitdiff
path: root/apps/settings_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r--apps/settings_list.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 7c5552a..521d565 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -549,6 +549,13 @@ static void tsc_set_default(void* setting, void* defaultval)
memcpy(setting, defaultval, sizeof(struct touchscreen_parameter));
}
#endif
+static const char* sleeptimer_formatter(char* buffer, size_t buffer_size,
+ int value, const char* unit)
+{
+ (void) unit;
+ snprintf(buffer, buffer_size, "%d:%02d", value / 60, value % 60);
+ return buffer;
+}
#ifdef HAVE_HOTKEY
static const char* hotkey_formatter(char* buffer, size_t buffer_size, int value,
const char* unit)
@@ -1759,6 +1766,11 @@ const struct settings_list settings[] = {
#endif /* CONFIG_CODEC == SWCODEC */
TEXT_SETTING(0, playlist_catalog_dir, "playlist catalog directory",
PLAYLIST_CATALOG_DEFAULT_DIR, NULL, NULL),
+ INT_SETTING(0, sleeptimer_duration, LANG_SLEEP_TIMER_DURATION, 30,
+ "sleeptimer duration",
+ UNIT_MIN, 5, 300, 5, sleeptimer_formatter, NULL, NULL),
+ OFFON_SETTING(0, sleeptimer_on_startup, LANG_SLEEP_TIMER_ON_POWER_UP, false,
+ "sleeptimer on startup", NULL),
#ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
CHOICE_SETTING(0, touchpad_sensitivity, LANG_TOUCHPAD_SENSITIVITY, 0,
"touchpad sensitivity", "normal,high", touchpad_set_sensitivity, 2,