diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2009-03-24 21:55:05 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2009-03-24 21:55:05 +0000 |
commit | ed1a3355deac93683a25296e573d65729bb3f2e7 (patch) | |
tree | 47d58088364cf9f042770e72b51fea223ace8bc7 /apps/menus/settings_menu.c | |
parent | 3adb821ad05d9c1169816379092cc807556cc822 (diff) |
Add a Touchscreen Mode setting to switch between 3x3 grid and absolute point modes. Note that many screens have not yet been adjusted to absolute point mode, so use with caution.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20520 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/settings_menu.c')
-rw-r--r-- | apps/menus/settings_menu.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 73d2463c36..56a0178000 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -265,6 +265,20 @@ MENUITEM_SETTING(buttonlight_brightness, &global_settings.buttonlight_brightness MENUITEM_SETTING(touchpad_sensitivity, &global_settings.touchpad_sensitivity, NULL); #endif +#ifdef HAVE_TOUCHSCREEN +static int touch_mode_callback(int action,const struct menu_item_ex *this_item) +{ + (void)this_item; + switch (action) + { + case ACTION_EXIT_MENUITEM: /* on exit */ + touchscreen_set_mode(global_settings.touch_mode); + break; + } + return action; +} +MENUITEM_SETTING(touch_mode, &global_settings.touch_mode, touch_mode_callback); +#endif MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu, @@ -284,7 +298,7 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), &car_adapter_mode, #endif #ifdef IPOD_ACCESSORY_PROTOCOL - &serial_bitrate, + &serial_bitrate, #endif #ifdef HAVE_ACCESSORY_SUPPLY &accessory_supply, @@ -301,6 +315,9 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING &touchpad_sensitivity, #endif +#ifdef HAVE_TOUCHSCREEN + &touch_mode, +#endif ); /* SYSTEM MENU */ |