Federico-Ciuffardi / GodotTouchInputManager

Asset that improves touch input support (includes new gestures) in the Godot game engine. It also translates mouse input to touch input.
MIT License
526 stars 35 forks source link

Unsafe warning #39

Closed btzr-io closed 7 months ago

btzr-io commented 8 months ago

I have this warning on v4.2.1.stable.official, no sure if this is something of concern ?

InputManager.gd:288 @ _emit(): An input event object is being parsed more than once in the same frame, which is unsafe.
If you are generating events in a script, you have to instantiate a new event instead of sending the same one more than once, unless the original one was sent on an earlier frame.
You can call duplicate() on the event to get a new instance with identical values.
  <C++ Source>   core/input/input.cpp:962 @ parse_input_event()
  <Stack Trace>  InputManager.gd:288 @ _emit()
                 InputManager.gd:210 @ _handle_screen_drag()
                 InputManager.gd:129 @ _unhandled_input()
Federico-Ciuffardi commented 8 months ago

I'm not sure what problems this could cause, but I created PR #41 which seems to fix the warning.

I would appreciate it if you could test it and let me know if it worked.

Solomar commented 7 months ago

I got the same warnings and the fix worked for me.

Federico-Ciuffardi commented 7 months ago

@Solomar Thanks for letting me know.