Change-Id: Ibca5879553a87e77014f850308d9b54cc339d474
This commit is contained in:
Amaury Pouly 2013-09-05 20:35:51 +02:00
parent df6eb82f51
commit 1165a08823
5 changed files with 9 additions and 3 deletions

View File

@ -1735,6 +1735,6 @@ thread.c
#endif /* defined(SIMULATOR) */
#if defined(HAVE_TOUCHPAD)
#if defined(HAVE_TOUCHPAD) && !defined(HAS_BUTTON_HOLD)
drivers/touchpad.c
#endif

View File

@ -172,6 +172,7 @@ enum touchscreen_mode touchscreen_get_mode(void)
return current_mode;
}
#ifndef HAS_BUTTON_HOLD
void touchscreen_enable(bool en)
{
if(en != touch_enabled)
@ -185,6 +186,7 @@ bool touchscreen_is_enabled(void)
{
return touch_enabled;
}
#endif
#if ((CONFIG_PLATFORM & PLATFORM_ANDROID) == 0)
/* android has an API for this */

View File

@ -52,7 +52,9 @@ void touchscreen_disable_mapping(void);
void touchscreen_reset_mapping(void);
int touchscreen_get_scroll_threshold(void);
void touchscreen_enable(bool en);
#ifndef HAS_BUTTON_HOLD
void touchscreen_enable_device(bool en);
bool touchscreen_is_enabled(void);
#endif
#endif /* __TOUCHSCREEN_INCLUDE_H_ */

View File

@ -393,7 +393,9 @@ static void button_event(int key, bool pressed)
#endif
default:
#ifdef HAVE_TOUCHSCREEN
# ifndef HAS_BUTTON_HOLD
if(touchscreen_is_enabled())
# endif
new_btn = key_to_touch(key, mouse_coords);
if (!new_btn)
#endif

View File

@ -382,14 +382,14 @@ void touchpad_set_sensitivity(int level)
}
#endif
#if defined(HAVE_TOUCHSCREEN) && !defined HAS_BUTTON_HOLD
#if defined(HAVE_TOUCHSCREEN) && !defined(HAS_BUTTON_HOLD)
void touchscreen_enable_device(bool en)
{
(void)en;
}
#endif
#if defined(HAVE_TOUCHPAD) && !defined HAS_BUTTON_HOLD
#if defined(HAVE_TOUCHPAD) && !defined(HAS_BUTTON_HOLD)
void touchpad_enable_device(bool en)
{
(void)en;