Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove await hack to prevent deadlocks #71

Closed
rsubtil opened this issue Feb 2, 2024 · 0 comments · Fixed by #77
Closed

Remove await hack to prevent deadlocks #71

rsubtil opened this issue Feb 2, 2024 · 0 comments · Fixed by #77
Labels
enhancement New feature or request

Comments

@rsubtil
Copy link
Owner

rsubtil commented Feb 2, 2024

godotengine/godot#80432 was the root cause for a deadlock in _joy_connection_changed. As it has been cherry-picked for 4.1.2 which is now the minimum addon version, this hack can now be deleted:

func _on_joy_connection_changed(device, connected):
if device == 0:
if connected:
# An await is required, otherwise a deadlock happens
await get_tree().process_frame
_set_last_input_type(InputType.CONTROLLER)
else:
# An await is required, otherwise a deadlock happens
await get_tree().process_frame
_set_last_input_type(InputType.KEYBOARD_MOUSE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant