diff --git a/android/src/main/cpp/main.cpp b/android/src/main/cpp/main.cpp
index f28ca4e..69546e8 100755
--- a/android/src/main/cpp/main.cpp
+++ b/android/src/main/cpp/main.cpp
@@ -437,10 +437,11 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
{
float y = AMotionEvent_getY(event, 0);
float x = AMotionEvent_getX(event, 0);
- tracked = 0;
p0.id = -1;
p1.id = -1;
- App::I.mouse_up(0, x, y);
+ if (tracked == 1)
+ App::I.mouse_up(0, x, y);
+ tracked = 0;
//LOG("first up");
return 1;
}
@@ -461,7 +462,7 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
return 1;
}
case AMOTION_EVENT_ACTION_MOVE:
- if (count == 1)
+ if (count == 1 && tracked == 1)
{
float y = AMotionEvent_getY(event, 0);
float x = AMotionEvent_getX(event, 0);
diff --git a/data/layout.xml b/data/layout.xml
index 3f298ce..1ce82dd 100644
--- a/data/layout.xml
+++ b/data/layout.xml
@@ -362,7 +362,8 @@
-