summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/drivers/touchscreen.c2
-rw-r--r--firmware/export/touchscreen.h2
-rw-r--r--firmware/target/hosted/sdl/button-sdl.c2
-rw-r--r--uisimulator/common/stubs.c4
5 files changed, 9 insertions, 3 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 0210abe2f7..f7bd4ed974 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1735,6 +1735,6 @@ thread.c
1735 1735
1736#endif /* defined(SIMULATOR) */ 1736#endif /* defined(SIMULATOR) */
1737 1737
1738#if defined(HAVE_TOUCHPAD) 1738#if defined(HAVE_TOUCHPAD) && !defined(HAS_BUTTON_HOLD)
1739drivers/touchpad.c 1739drivers/touchpad.c
1740#endif 1740#endif
diff --git a/firmware/drivers/touchscreen.c b/firmware/drivers/touchscreen.c
index 8ce2400ca2..42ddf7ec47 100644
--- a/firmware/drivers/touchscreen.c
+++ b/firmware/drivers/touchscreen.c
@@ -172,6 +172,7 @@ enum touchscreen_mode touchscreen_get_mode(void)
172 return current_mode; 172 return current_mode;
173} 173}
174 174
175#ifndef HAS_BUTTON_HOLD
175void touchscreen_enable(bool en) 176void touchscreen_enable(bool en)
176{ 177{
177 if(en != touch_enabled) 178 if(en != touch_enabled)
@@ -185,6 +186,7 @@ bool touchscreen_is_enabled(void)
185{ 186{
186 return touch_enabled; 187 return touch_enabled;
187} 188}
189#endif
188 190
189#if ((CONFIG_PLATFORM & PLATFORM_ANDROID) == 0) 191#if ((CONFIG_PLATFORM & PLATFORM_ANDROID) == 0)
190/* android has an API for this */ 192/* android has an API for this */
diff --git a/firmware/export/touchscreen.h b/firmware/export/touchscreen.h
index 7421fe0b33..4aecb0310a 100644
--- a/firmware/export/touchscreen.h
+++ b/firmware/export/touchscreen.h
@@ -52,7 +52,9 @@ void touchscreen_disable_mapping(void);
52void touchscreen_reset_mapping(void); 52void touchscreen_reset_mapping(void);
53int touchscreen_get_scroll_threshold(void); 53int touchscreen_get_scroll_threshold(void);
54void touchscreen_enable(bool en); 54void touchscreen_enable(bool en);
55#ifndef HAS_BUTTON_HOLD
55void touchscreen_enable_device(bool en); 56void touchscreen_enable_device(bool en);
56bool touchscreen_is_enabled(void); 57bool touchscreen_is_enabled(void);
58#endif
57 59
58#endif /* __TOUCHSCREEN_INCLUDE_H_ */ 60#endif /* __TOUCHSCREEN_INCLUDE_H_ */
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c
index f69c0a509b..eb4869ae25 100644
--- a/firmware/target/hosted/sdl/button-sdl.c
+++ b/firmware/target/hosted/sdl/button-sdl.c
@@ -393,7 +393,9 @@ static void button_event(int key, bool pressed)
393#endif 393#endif
394 default: 394 default:
395#ifdef HAVE_TOUCHSCREEN 395#ifdef HAVE_TOUCHSCREEN
396# ifndef HAS_BUTTON_HOLD
396 if(touchscreen_is_enabled()) 397 if(touchscreen_is_enabled())
398# endif
397 new_btn = key_to_touch(key, mouse_coords); 399 new_btn = key_to_touch(key, mouse_coords);
398 if (!new_btn) 400 if (!new_btn)
399#endif 401#endif
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 54ab6be76f..18f60ce6b3 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -382,14 +382,14 @@ void touchpad_set_sensitivity(int level)
382} 382}
383#endif 383#endif
384 384
385#if defined(HAVE_TOUCHSCREEN) && !defined HAS_BUTTON_HOLD 385#if defined(HAVE_TOUCHSCREEN) && !defined(HAS_BUTTON_HOLD)
386void touchscreen_enable_device(bool en) 386void touchscreen_enable_device(bool en)
387{ 387{
388 (void)en; 388 (void)en;
389} 389}
390#endif 390#endif
391 391
392#if defined(HAVE_TOUCHPAD) && !defined HAS_BUTTON_HOLD 392#if defined(HAVE_TOUCHPAD) && !defined(HAS_BUTTON_HOLD)
393void touchpad_enable_device(bool en) 393void touchpad_enable_device(bool en)
394{ 394{
395 (void)en; 395 (void)en;