The Input System 1.7.0 does not recognize PlayStation gamepads disconnected by Bluetooth.

I’m working on a template to control local and single-player matches using Input System 1.7.0.
In the function ‘InputSystem.onDeviceChange += DevicesChanged’ I manage the connection and disconnection of my gamepads. Everything works seamlessly with wired gamepads, but when testing with Bluetooth, an issue arises specifically with PlayStation gamepads.

I can successfully disconnect the controllers by either disabling Bluetooth in Windows settings or removing the device from the devices list in Windows. However, when I hold the PS system button for 10 seconds to disable my PlayStation gamepad, the input system fails to recognize that it has been disconnected. This issue occurs with both the PS4 DualShock and PS5 DualSense controllers. Interestingly, I attempted to reproduce the problem with an Xbox controller, and it worked correctly.

Any insights or suggestions on how to address this disconnect recognition problem with PlayStation gamepads in Bluetooth mode would be greatly appreciated.

1 Like

Same problem here.
gamepad.lastUpdateTime
lastUpdateTime is updated every ms. So you can compare the Time with lastUpdateTime.
if the difference more than 2s or what you want so remove this controller from you custom Gamepad list.

if(myGamepad == null || (Time.time - myGamepad.lastUpdateTime) > 5f)
myList.Remove(myGamepad);

or myGamepad.active

myGamepad = assigned Gamepad for the player

I’m also encountering this issue. Have either of you filed a bug report for this?

The Xbox controller I’m testing with disconnects fine, and reports as such to the Editor/Engine, but the PS4 controller does not. It remains “connected” indefinitely upon disconnecting, cannot be reconnected, and stops any other controllers from being connected either.

Edit: Well, in-case neither of you had, I’ve gone ahead and submitted a bug report for this issue as it’s still present in the Input System v1.8.2 as far as I can see.