Skip to content

clear joystick state on disconnection

Rafał Mikrut requested to merge github/fork/Hinsbart/clear-joy-state into master

Created by: Hinsbart

Previously, the joystick helper methods (e.g is_joy_button_pressed()) returned out-dated values when called after the device has been (unexpectedly) disconnected, leading to undesired behaviour.

Well, one could connect on the joy_connection_changed signal and stop input polling if necessary, but we shouldn't expect this. And the joystick state should be clean anyway when there's no device.

Merge request reports