diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-12-01 18:25:42 +0000 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-09-08 11:21:54 +0200 |
commit | 8146b40e73bb999001787fbf414c96acf5dce2a8 (patch) | |
tree | e3a1b2f951fd439c71d82e387d04df10d926b4e9 /apps/menus | |
parent | 847106cdb20a0297dc9a10f212f0e3c8e6f3d58c (diff) | |
download | rockbox-8146b40e73bb999001787fbf414c96acf5dce2a8.tar.gz rockbox-8146b40e73bb999001787fbf414c96acf5dce2a8.zip |
Fuze+: add a configurable deadzone area for touchpad buttons
To stop erroneous button presses, allow users to add a deadzone between
the button via the Settings > General > System menu > Touch Dead Zone.
The configuration was chosen this way: the touchpad has the same DPI
in both direction so the setting applies the same on both the X and Y
axis. The setting ranges from 0 to 100 and is internally multiplied by 2
giving a maximum deadzone of 2*100 = 200 around each button, which
account for 400 total (once around each button), effectively reducing
each virtual button from 1000x600 to 600x200 when using the maximum value.
Change-Id: I8683c63d2950200eb32d1dda0a00bbd92d83d5be
Reviewed-on: http://gerrit.rockbox.org/677
Reviewed-by: Benjamin Brown <foolshperson@gmail.com>
Tested: Benjamin Brown <foolshperson@gmail.com>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Diffstat (limited to 'apps/menus')
-rw-r--r-- | apps/menus/settings_menu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 0d2a7febf1..130f5be1a2 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -317,6 +317,10 @@ MENUITEM_SETTING(buttonlight_brightness, &global_settings.buttonlight_brightness | |||
317 | MENUITEM_SETTING(touchpad_sensitivity, &global_settings.touchpad_sensitivity, NULL); | 317 | MENUITEM_SETTING(touchpad_sensitivity, &global_settings.touchpad_sensitivity, NULL); |
318 | #endif | 318 | #endif |
319 | 319 | ||
320 | #ifdef HAVE_TOUCHPAD_DEADZONE | ||
321 | MENUITEM_SETTING(touchpad_deadzone, &global_settings.touchpad_deadzone, NULL); | ||
322 | #endif | ||
323 | |||
320 | #ifdef HAVE_QUICKSCREEN | 324 | #ifdef HAVE_QUICKSCREEN |
321 | MENUITEM_SETTING(shortcuts_replaces_quickscreen, &global_settings.shortcuts_replaces_qs, NULL); | 325 | MENUITEM_SETTING(shortcuts_replaces_quickscreen, &global_settings.shortcuts_replaces_qs, NULL); |
322 | #endif | 326 | #endif |
@@ -363,6 +367,9 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), | |||
363 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING | 367 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING |
364 | &touchpad_sensitivity, | 368 | &touchpad_sensitivity, |
365 | #endif | 369 | #endif |
370 | #ifdef HAVE_TOUCHPAD_DEADZONE | ||
371 | &touchpad_deadzone, | ||
372 | #endif | ||
366 | #ifdef USB_ENABLE_HID | 373 | #ifdef USB_ENABLE_HID |
367 | &usb_hid, | 374 | &usb_hid, |
368 | &usb_keypad_mode, | 375 | &usb_keypad_mode, |