Comments (6)
The bug is caused by discontinuing listening to the wireless adapter, which is done here: https://github.com/paroj/xpad/blob/connected_only/xpad.c#L687
Even if a device isn't physically connected to the adapter, this is how the adapter tells you whether a controller is connected or not. You must always be listening.
from xpad.
The adapter has a hard limit for 4 controllers. On top of this, there are only 4 LED positions. The original XUSB driver also only supported 4 controllers. I remember why I only supported 4 controllers with Xpad5
from xpad.
yeah.. I probably should just go with intf->cur_altsetting->desc.bInterfaceNumber
for enumerating the wireless controllers.
But this is the usecase I am thinking about and which is covered by the current atomic counter approach:
- attach a wired x360 pad (LED1)
- connect a wireless x360 pad (LED2)
the 5th controller is identified by LED1 again
However the counter just keeps incrementing after suspend/ resume. (this is the actual issue with it)
But this is unrelated to only exposing connected devices and I should treat it as a different issue.
from xpad.
thanks for the hint regarding listening to the adapter. will try it as soon as I have some time
from xpad.
Really, you can just hold some global state that can track when controllers are connected.
Using the interface number would break when used in combination with wired controllers.
from xpad.
works 👍
from xpad.
Related Issues (20)
- debug recognised but not responding 8bitdo ultimate / manjaro
- Razer Atrox Xboxone LT & RT not working
- Microsoft Xbox 360 USB controller does not
- Microsoft Xbox 360 USB controller does not get properly initialized, automatically reconnects and gets erroneously recognized as a PS3 controller HOT 1
- not a mtp device -- Using degraded feature set UDP instead of UDP+EDNS0 for DNS server xxx.xx.xxx.x
- xpad return error -19 in the 8bitDo controller HOT 3
- Upstream question HOT 1
- GameSir T4 Kaleid Support? HOT 1
- (Better) support for 8BitDo Ultimate Wired Controller [PC/Switch] HOT 3
- 8BitDo Pro 2 (wired) input not properly detected if plugged in at OS boot. HOT 1
- cannot detect multiple wired xbox 360 controllers
- Module not auto update after new kernel install? HOT 3
- Error! Bad return status for module build.... /tools/bpf/resolve_btfids/resolve_btfids: No such file or directory
- Fantech WGP13 isn't recognized as an xbox controller
- (support) Gameshark Green Ghost gamepad
- Problem with Fantech GP13 controller.
- Extra buttons support for Flydigi Vader 3 Pro
- PDP Wired Controller misidentified as an arcade stick
- Support Request: HyperX Clutch HOT 1
- Extra Button Support Black Shark Green Ghost Controller HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xpad.