Skip to content

Commit

Permalink
Merge pull request #55466 from Faless/js/4.x_input_fix_touch
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Nov 30, 2021
2 parents 75d1ae4 + 470496d commit 2d118bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platform/javascript/js/libs/library_godot_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ const GodotInput = {
for (let i = 0; i < touches.length; i++) {
const touch = touches[i];
const pos = GodotInput.computePosition(touch, rect);
GodotRuntime.setHeapValue(coords + (i * 2), pos[0], 'double');
GodotRuntime.setHeapValue(coords + (i * 2 + 8), pos[1], 'double');
GodotRuntime.setHeapValue(ids + i, touch.identifier, 'i32');
GodotRuntime.setHeapValue(coords + (i * 2) * 8, pos[0], 'double');
GodotRuntime.setHeapValue(coords + (i * 2 + 1) * 8, pos[1], 'double');
GodotRuntime.setHeapValue(ids + i * 4, touch.identifier, 'i32');
}
func(type, touches.length);
if (evt.cancelable) {
Expand Down

0 comments on commit 2d118bd

Please sign in to comment.