summaryrefslogtreecommitdiff
path: root/apps/settings_list.c
diff options
context:
space:
mode:
authorJean-Louis Biasini <jlbiasini@gmail.com>2013-07-13 19:02:41 +0300
committerAmaury Pouly <amaury.pouly@gmail.com>2013-07-15 09:22:32 +0200
commita8cea3b71c7d40636be8bf311775d3a083f18cb4 (patch)
tree75d9c0edf2867e7fa1c83f219f0264e36a7fa1da /apps/settings_list.c
parent7827b7ccdbfd639a0c49052ec7c94ae29c50f2ea (diff)
downloadrockbox-a8cea3b71c7d40636be8bf311775d3a083f18cb4.zip
rockbox-a8cea3b71c7d40636be8bf311775d3a083f18cb4.tar.gz
rockbox-a8cea3b71c7d40636be8bf311775d3a083f18cb4.tar.bz2
rockbox-a8cea3b71c7d40636be8bf311775d3a083f18cb4.tar.xz
Add an alternative analogic touchpad sensitivity setting
Set an alternative touchpad sensitivity setting if the 3 following variables are defined: DEFAULT_TOUCHPAD_SENSITIVITY_SETTING MIN_TOUCHPAD_SENSITIVITY_SETTING MAX_TOUCHPAD_SENSITIVITY_SETTING aside from the usual: HAVE_TOUCHPAD HAVE_TOUCHPAD_SENSITIVITY_SETTING In such a case the setting will allow the user to set a precise value within the defined range unstead of the boolean choice HIGH/NORMAL Change-Id: Iba8140285317077381191e494df0d3f6ab556872 Reviewed-on: http://gerrit.rockbox.org/123 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r--apps/settings_list.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 7b42b4e..53e79fa 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1965,10 +1965,20 @@ const struct settings_list settings[] = {
OFFON_SETTING(0, keypress_restarts_sleeptimer, LANG_KEYPRESS_RESTARTS_SLEEP_TIMER, false,
"keypress restarts sleeptimer", set_keypress_restarts_sleep_timer),
#ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
+/* If specific values are set for touchpad sensitivity setting we use those */
+#if (defined(MAX_TOUCHPAD_SENSITIVITY_SETTING) \
+ && defined(MIN_TOUCHPAD_SENSITIVITY_SETTING) \
+ && defined(DEFAULT_TOUCHPAD_SENSITIVITY_SETTING))
+ INT_SETTING(F_NO_WRAP, touchpad_sensitivity, LANG_TOUCHPAD_SENSITIVITY,
+ DEFAULT_TOUCHPAD_SENSITIVITY_SETTING, "touchpad sensitivity",UNIT_INT,
+ MIN_TOUCHPAD_SENSITIVITY_SETTING, MAX_TOUCHPAD_SENSITIVITY_SETTING, 1,
+ NULL, NULL, touchpad_set_sensitivity),
+#else /* we failback to boolean normal/high values */
CHOICE_SETTING(0, touchpad_sensitivity, LANG_TOUCHPAD_SENSITIVITY, 0,
"touchpad sensitivity", "normal,high", touchpad_set_sensitivity, 2,
ID2P(LANG_NORMAL), ID2P(LANG_HIGH)),
-#endif
+#endif /* boolean or analogig values */
+#endif /* HAVE_TOUCHPAD_SENSITIVITY_SETTING */
#ifdef HAVE_QUICKSCREEN
CUSTOM_SETTING(0, qs_items[QUICKSCREEN_TOP], LANG_TOP_QS_ITEM,
NULL, "qs top",