summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-09-05 20:35:51 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-09-05 20:35:51 +0200
commit1165a0882349ce1f1a426c642062dc06d0019265 (patch)
treebe471ad1b96280801f893142ed9d279631e5008a
parentdf6eb82f5156256e1999374ce9b1a159610ff9a0 (diff)
downloadrockbox-1165a0882349ce1f1a426c642062dc06d0019265.tar.gz
rockbox-1165a0882349ce1f1a426c642062dc06d0019265.zip
fix red
Change-Id: Ibca5879553a87e77014f850308d9b54cc339d474
-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
#endif /* defined(SIMULATOR) */
-#if defined(HAVE_TOUCHPAD)
+#if defined(HAVE_TOUCHPAD) && !defined(HAS_BUTTON_HOLD)
drivers/touchpad.c
#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)
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 */
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);
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_ */
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)
#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
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)
}
#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;