summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2010-08-16 20:12:10 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2010-08-16 20:12:10 +0000
commit5068891477a7890bef94092fd184f7b30aa17b9d (patch)
tree5c51141221c2e444143a0bae42fb8b82bb348c69 /firmware
parent934a5a5808c7a0b0dff469ad2c3a523e78a4ef4b (diff)
downloadrockbox-5068891477a7890bef94092fd184f7b30aa17b9d.tar.gz
rockbox-5068891477a7890bef94092fd184f7b30aa17b9d.tar.bz2
rockbox-5068891477a7890bef94092fd184f7b30aa17b9d.zip
Android port: simplify sending touch events from Java->C
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27833 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/hosted/android/button-android.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/firmware/target/hosted/android/button-android.c b/firmware/target/hosted/android/button-android.c
index 50e347e714..a7ac9baec8 100644
--- a/firmware/target/hosted/android/button-android.c
+++ b/firmware/target/hosted/android/button-android.c
@@ -39,31 +39,22 @@ static enum {
} last_state = STATE_UNKNOWN;
/*
- * this writes in an interrupt-like fashion the last pixel coordinates
- * that the user pressed on the screen */
-JNIEXPORT void JNICALL
-Java_org_rockbox_RockboxFramebuffer_pixelHandler(JNIEnv*env, jobject this,
- int x, int y)
-{
- (void)env;
- (void)this;
- last_x = x;
- last_y = y;
-}
-
-/*
* this notifies us in an interrupt-like fashion whether the user just
- * began or stopped the touch action */
+ * began or stopped the touch action + where (pixel coordinates) */
JNIEXPORT void JNICALL
Java_org_rockbox_RockboxFramebuffer_touchHandler(JNIEnv*env, jobject this,
- int down)
+ bool down, int x, int y)
{
(void)env;
(void)this;
+
if (down)
last_state = STATE_DOWN;
else
last_state = STATE_UP;
+
+ last_x = x;
+ last_y = y;
}
/*