From 1d6fb764447964c3a1039834740fd2aa53ddcac0 Mon Sep 17 00:00:00 2001 From: di-ant Date: Wed, 24 Nov 2021 00:07:59 +0600 Subject: [PATCH] reorder things --- src/rcore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 1dece1a09..7cf3651c2 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -5439,6 +5439,9 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event) return 0; } + // Register touch points count + CORE.Input.Touch.pointCount = AMotionEvent_getPointerCount(event); + int32_t action = AMotionEvent_getAction(event); unsigned int flags = action & AMOTION_EVENT_ACTION_MASK; @@ -5447,9 +5450,6 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event) if (flags == AMOTION_EVENT_ACTION_POINTER_UP || flags == AMOTION_EVENT_ACTION_UP) CORE.Input.Touch.pointCount -= 1; - // Register touch points count - CORE.Input.Touch.pointCount = AMotionEvent_getPointerCount(event); - for (int i = 0; (i < CORE.Input.Touch.pointCount) && (i < MAX_TOUCH_POINTS); i++) { // Register touch points id