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

Wireless Xbox 360 gamepad sometimes fails to reconnect in Windows 11 #228

Open
Djhg2000 opened this issue Apr 8, 2024 · 0 comments
Open

Comments

@Djhg2000
Copy link

Djhg2000 commented Apr 8, 2024

Environment

  • OS: Windows 11
  • Version 1.9.17

Describe the bug
A wireless Xbox 360 controller configured in the Gamepad module sometimes fails to reconnect on Windows 11. It doesn't always happen and seems to depend on how long the controller was disconnected for. Also the controller will be missing from the dropdown in the Gamepad module until Chataigne is restarted.

The bug is not reproducible in Linux (Debian Trixie/Sid), the same controller always successfully reconnects. I only tested with reasonable amounts of time and most of it accidentally but at least half an hour.

To Reproduce
Steps to reproduce the behavior:

  1. Add the Gamepad module
  2. Select the wireless Xbox 360 controller
  3. Confirm the connection by looking at the live values
  4. Take out the batteries or move far away for longer than a few seconds (maybe a minute?)
  5. Put the batteries back in and power on the controller or move back within range again
  6. Chataigne will now have a chance of being unable to detect the controller at all

Expected behavior
I would expect the controller to reconnect. For short interruptions (like quickly swapping batteries) it usually does reconnect.

Additional context
It seems to me like the handle for the particular controller gets invalidated by Windows 11 and it's necessary to reproble the XInput API for new controllers. I'm not familiar with the API itself and especially not in Windows 11, but that's the impression I'm getting.

I have not tested if the bug occurs with wired controllers as well but I can test that next time I have access to the Windows 11 machine.

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

No branches or pull requests

1 participant