Waterdish / Shipwright-Android

Ship of Harkinian Android Port
117 stars 7 forks source link

Controllers cannot reconnect after disconnection #1

Closed EZonTheEyes closed 3 months ago

EZonTheEyes commented 7 months ago

On several instances, in play sessions of lengths varying from 1 minute to 20 minutes, the controller seems to randomly stop working However the input device is still functioning and connected to android. If there is no input when it disconnects, it cannot reconnect and the game ceases to take input. If there is input while it disconnects, the game gets stuck on that input. It seems a restart of the app is required to get the game to take input from the input device again.

This was noticed on an Xbox One controller connected over Bluetooth.

Tested on a Samsung S22 Ultra, Snapdragon 8G1, 615.0 System Drivers, Android 13 (S908USQS3CWI1)

Occurring with input: https://github.com/Waterdish/Shipwright-Android/assets/103911396/6a6d1062-199b-4616-9b86-28d3ca2b2870

Occurring with no current input: https://github.com/Waterdish/Shipwright-Android/assets/103911396/87ff57a4-c45b-49fb-84f5-0cd258c7b417

(On further testing- may just be as simple as if the controller disconnects it cannot reconnect to give input.)

Waterdish commented 7 months ago

Yeah this is an issue with SDL where it only detects gamepads at startup. Connecting mid-game doesn't work. This is definitely not ideal and I'll see what I can do to fix it.

Waterdish commented 6 months ago

This should be fixed in the latest update (1.1.1). Let me know if it doesn't work for some reason.

EZonTheEyes commented 5 months ago

Will retest soon and mention findings in a comment, thanks for the update 👍