You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #92133 from m4gr3d/fix_touch_input
Fix invalid detection of mouse input
This commit is contained in:
@@ -298,11 +298,13 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_dispatchTouchEvent(JN
|
||||
|
||||
Vector<AndroidInputHandler::TouchPos> points;
|
||||
for (int i = 0; i < pointer_count; i++) {
|
||||
jfloat p[3];
|
||||
env->GetFloatArrayRegion(position, i * 3, 3, p);
|
||||
jfloat p[6];
|
||||
env->GetFloatArrayRegion(position, i * 6, 6, p);
|
||||
AndroidInputHandler::TouchPos tp;
|
||||
tp.pos = Point2(p[1], p[2]);
|
||||
tp.id = (int)p[0];
|
||||
tp.pos = Point2(p[1], p[2]);
|
||||
tp.pressure = p[3];
|
||||
tp.tilt = Vector2(p[4], p[5]);
|
||||
points.push_back(tp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user