summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-08-04 12:25:25 +0000
committerThomas Martitz <kugel@rockbox.org>2010-08-04 12:25:25 +0000
commit04dc00b7caa9f505ed3dd55fe5922910d004fa80 (patch)
tree52798713d9afae61746d72ff79a1826f1781ab8d /firmware/target/hosted
parentf0611f878101caa323b3b0693c0cf7170f59fe00 (diff)
downloadrockbox-04dc00b7caa9f505ed3dd55fe5922910d004fa80.tar.gz
rockbox-04dc00b7caa9f505ed3dd55fe5922910d004fa80.tar.bz2
rockbox-04dc00b7caa9f505ed3dd55fe5922910d004fa80.zip
Add a few forgotten files, Fix potential startup problem. Fix absolute touchscreen mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27693 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r--firmware/target/hosted/android/button-android.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/firmware/target/hosted/android/button-android.c b/firmware/target/hosted/android/button-android.c
index 67e8ca1f89..1172880908 100644
--- a/firmware/target/hosted/android/button-android.c
+++ b/firmware/target/hosted/android/button-android.c
@@ -27,7 +27,6 @@
#include "system.h"
#include "touchscreen.h"
-static long last_touch;
static int last_y, last_x;
static enum {
@@ -48,7 +47,6 @@ Java_org_rockbox_RockboxFramebuffer_pixelHandler(JNIEnv*env, jobject this,
(void)this;
last_x = x;
last_y = y;
- last_touch = current_tick;
}
/*
@@ -68,20 +66,11 @@ Java_org_rockbox_RockboxFramebuffer_touchHandler(JNIEnv*env, jobject this,
void button_init_device(void)
{
- last_touch = current_tick;
}
int button_read_device(int *data)
{
/* get grid button/coordinates based on the current touchscreen mode */
int btn = touchscreen_to_pixels(last_x, last_y, data);
- if (last_state == STATE_DOWN)
- {
- return btn;
- }
- else
- {
- *data = last_x = last_y = 0;
- return 0;
- }
+ return (last_state == STATE_DOWN ? btn : 0);
}