mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Ensure joy_connection_changed is emitted on the main thread
(cherry picked from commit 1bb73b0689)
This commit is contained in:
parent
fc130b26f8
commit
788ee7938b
1 changed files with 2 additions and 1 deletions
|
|
@ -473,7 +473,8 @@ void Input::joy_connection_changed(int p_idx, bool p_connected, String p_name, S
|
|||
}
|
||||
joy_names[p_idx] = js;
|
||||
|
||||
emit_signal(SNAME("joy_connection_changed"), p_idx, p_connected);
|
||||
// Ensure this signal is emitted on the main thread, as some platforms (e.g. Linux) call this from a different thread.
|
||||
call_deferred("emit_signal", SNAME("joy_connection_changed"), p_idx, p_connected);
|
||||
}
|
||||
|
||||
Vector3 Input::get_gravity() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue