summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rw-r--r--android/src/org/rockbox/RockboxFramebuffer.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/android/src/org/rockbox/RockboxFramebuffer.java b/android/src/org/rockbox/RockboxFramebuffer.java
index 1734b4fab1..6d11e1af14 100644
--- a/android/src/org/rockbox/RockboxFramebuffer.java
+++ b/android/src/org/rockbox/RockboxFramebuffer.java
@@ -80,20 +80,22 @@ public class RockboxFramebuffer extends View
80 80
81 public boolean onTouchEvent(MotionEvent me) 81 public boolean onTouchEvent(MotionEvent me)
82 { 82 {
83 int x = (int) me.getX();
84 int y = (int) me.getY();
85
83 switch (me.getAction()) 86 switch (me.getAction())
84 { 87 {
85 case MotionEvent.ACTION_CANCEL: 88 case MotionEvent.ACTION_CANCEL:
86 case MotionEvent.ACTION_UP: 89 case MotionEvent.ACTION_UP:
87 touchHandler(0); 90 touchHandler(false, x, y);
88 break; 91 return true;
89 case MotionEvent.ACTION_MOVE: 92 case MotionEvent.ACTION_MOVE:
90 case MotionEvent.ACTION_DOWN: 93 case MotionEvent.ACTION_DOWN:
91 touchHandler(1); 94 touchHandler(true, x, y);
92 break; 95 return true;
93
94 } 96 }
95 pixelHandler((int)me.getX(), (int)me.getY()); 97
96 return true; 98 return false;
97 } 99 }
98 100
99 public boolean onKeyDown(int keyCode, KeyEvent event) 101 public boolean onKeyDown(int keyCode, KeyEvent event)
@@ -118,7 +120,6 @@ public class RockboxFramebuffer extends View
118 } 120 }
119 121
120 public native void set_lcd_active(int active); 122 public native void set_lcd_active(int active);
121 public native void pixelHandler(int x, int y); 123 public native void touchHandler(boolean down, int x, int y);
122 public native void touchHandler(int down);
123 public native boolean buttonHandler(int keycode, boolean state); 124 public native boolean buttonHandler(int keycode, boolean state);
124} 125}