summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/android/button-android.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/android/button-android.c')
-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 {
39} last_state = STATE_UNKNOWN; 39} last_state = STATE_UNKNOWN;
40 40
41/* 41/*
42 * this writes in an interrupt-like fashion the last pixel coordinates
43 * that the user pressed on the screen */
44JNIEXPORT void JNICALL
45Java_org_rockbox_RockboxFramebuffer_pixelHandler(JNIEnv*env, jobject this,
46 int x, int y)
47{
48 (void)env;
49 (void)this;
50 last_x = x;
51 last_y = y;
52}
53
54/*
55 * this notifies us in an interrupt-like fashion whether the user just 42 * this notifies us in an interrupt-like fashion whether the user just
56 * began or stopped the touch action */ 43 * began or stopped the touch action + where (pixel coordinates) */
57JNIEXPORT void JNICALL 44JNIEXPORT void JNICALL
58Java_org_rockbox_RockboxFramebuffer_touchHandler(JNIEnv*env, jobject this, 45Java_org_rockbox_RockboxFramebuffer_touchHandler(JNIEnv*env, jobject this,
59 int down) 46 bool down, int x, int y)
60{ 47{
61 (void)env; 48 (void)env;
62 (void)this; 49 (void)this;
50
63 if (down) 51 if (down)
64 last_state = STATE_DOWN; 52 last_state = STATE_DOWN;
65 else 53 else
66 last_state = STATE_UP; 54 last_state = STATE_UP;
55
56 last_x = x;
57 last_y = y;
67} 58}
68 59
69/* 60/*