reorder things

This commit is contained in:
di-ant 2021-11-24 00:07:59 +06:00
parent c0da7f1065
commit 1d6fb76444

View File

@ -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