mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #55466 from Faless/js/4.x_input_fix_touch
This commit is contained in:
commit
2d118bd8b8
1 changed files with 3 additions and 3 deletions
|
@ -424,9 +424,9 @@ const GodotInput = {
|
||||||
for (let i = 0; i < touches.length; i++) {
|
for (let i = 0; i < touches.length; i++) {
|
||||||
const touch = touches[i];
|
const touch = touches[i];
|
||||||
const pos = GodotInput.computePosition(touch, rect);
|
const pos = GodotInput.computePosition(touch, rect);
|
||||||
GodotRuntime.setHeapValue(coords + (i * 2), pos[0], 'double');
|
GodotRuntime.setHeapValue(coords + (i * 2) * 8, pos[0], 'double');
|
||||||
GodotRuntime.setHeapValue(coords + (i * 2 + 8), pos[1], 'double');
|
GodotRuntime.setHeapValue(coords + (i * 2 + 1) * 8, pos[1], 'double');
|
||||||
GodotRuntime.setHeapValue(ids + i, touch.identifier, 'i32');
|
GodotRuntime.setHeapValue(ids + i * 4, touch.identifier, 'i32');
|
||||||
}
|
}
|
||||||
func(type, touches.length);
|
func(type, touches.length);
|
||||||
if (evt.cancelable) {
|
if (evt.cancelable) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue