-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Second gamepad stops working after first is disconnected #84737
Comments
I can't reproduce using the MRP on 4.1.3 on Windows 10 with an Xbox 360 and Xbox One controller connected via USB. I've annotated the output from the MRP to explain what I'm doing to produce the output: # no devices connected
[]
# connect the first device (device 0)
[0]
# press a button
d0
# connect a second device (device 1)
[0, 1]
# press buttons on each device
d1
d0
# disconnect device 0
[1] # only device 1 remains
# press a button on device 1
d1
# reconnect device 0
[0, 1]
# press buttons on each device
d0
d1
# disconnect device 1
[0] # only device 0 remains
# press a button on device 0
d0
# reconnect device 1
[0, 1]
# press a button on both devices
d1
d0 Everything appears to be working as it should. |
I've noted similar behaviour as @yhwhey when disconnecting gamepads, I had the same issue with DualShock 4 controllers. Seems like disconnecting causes all the other gamepads to reassign a new device ID, which in my local multiplayer game then causes players 2 and 3 to control the characters for player 1 and 2 instead. I'll see if I can test this out using Xinput gamepads instead to get the same result as @Deozaan. |
I have also run into this issue a couple times now. I specifically use PS4 controllers on my windows machine with Godot 4.3. I begin a game with only 2 controllers connected. As @Red-dog95 commented, the device id's are being re-calculated (apparently before the device change signals get captured). Naturally, that makes persistent couch coop controls tough to work with. |
@yhwhey, @Red-dog95, @Kiveo: some extra handling in that area has been added to master recently, could you please test there? I believe 4.4 dev 7 also has it |
Godot version
4.1.3.stable
System information
Windows 10, Dualsense Controllers
Issue description
If the first gamepad (deviceId 0) connected to the machine is disconnected, the second controller (deviceId 1) stops registering input. However if the second controller disconnects, the first will continue to work.
Reconnecting the first controller causes only this controller to work and have the ID 1. The second controller still does not register
Steps to reproduce
Also note that device ID for second gamepad has changed from 1 to 0 which I don't believe is or should be the intended behavior
Minimal reproduction project
test_controller_issue.zip
The text was updated successfully, but these errors were encountered: