GestureDetector: Translate start & end gesture positions when rotated (#13101)

* GestureDetector:adjustGesCoordinate: Remove one layer of indirectiçon in
direction translation

That function call wrapper felt pretty unnecessary to me ;).

* GestureDetector: Translate complex gesture positions, too

i.e., if there's a start and end position, translate those, too.

Fix #13090
This commit is contained in:
NiLuJe
2025-01-31 18:30:23 +01:00
committed by GitHub
parent 3dba40d884
commit aa421bf277
2 changed files with 45 additions and 18 deletions

View File

@@ -19,6 +19,8 @@ describe("gesturedetector module", function()
DEVICE_ROTATED_COUNTER_CLOCKWISE = 3,
}
GestureDetector.screen.getTouchRotation = function() return rotation_mode end
GestureDetector.screen.getHeight = function() return 800 end
GestureDetector.screen.getWidth = function() return 600 end
return GestureDetector:adjustGesCoordinate(ges).direction
end