Debian amd64 testing, all up to date.
inequation at gunship:~/projects/SDL/test$ ./testgamecontroller
INFO: Joystick (not recognized as game controller) 0: Xbox 360
Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)
INFO: Joystick (not recognized as game controller) 1: Xbox 360
Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)
INFO: Joystick (not recognized as game controller) 2: Xbox 360
Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)
INFO: Joystick (not recognized as game controller) 3: Xbox 360
Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)
INFO: There are 0 game controller(s) attached (4 joystick(s))
inequation at gunship:~/projects/SDL/test$
As far as I can tell, this is the same GUID as in SDL_gamecontrollerdb.h…
The port is USB 2.0, not 1.1, in case anyone wondered, and the device uses xpad.
inequation at gunship:~/projects/SDL/test$ lsusb -t
/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M
|__ Port 2: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 2: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
|__ Port 2: Dev 4, If 2, Class=Vendor Specific Class, Driver=, 12M
|__ Port 2: Dev 4, If 3, Class=Application Specific Interface, Driver=, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
|__ Port 5: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 9, If 0, Class=Vendor Specific Class, Driver=xpad, 12M
|__ Port 3: Dev 9, If 1, Class=Vendor Specific Class, Driver=, 12M
|__ Port 3: Dev 9, If 2, Class=Vendor Specific Class, Driver=xpad, 12M
|__ Port 3: Dev 9, If 3, Class=Vendor Specific Class, Driver=, 12M
|__ Port 3: Dev 9, If 4, Class=Vendor Specific Class, Driver=xpad, 12M
|__ Port 3: Dev 9, If 5, Class=Vendor Specific Class, Driver=, 12M
|__ Port 3: Dev 9, If 6, Class=Vendor Specific Class, Driver=xpad, 12M
|__ Port 3: Dev 9, If 7, Class=Vendor Specific Class, Driver=, 12M
|__ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
inequation at gunship:~/projects/SDL/test$
And just to make sure, kernel module is loaded:
inequation at gunship:~/projects/SDL/test$ lsmod | grep xpad
xpad 17096 0
ff_memless 12755 1 xpad
usbcore 134993 11
xpad,btusb,uhci_hcd,uvcvideo,usb_storage,ehci_hcd,ehci_pci,usbnet,cdc_acm,cdc_wdm,cdc_ether
inequation at gunship:~/projects/SDL/test$
I guess I have no choice but to actually debug the SDL_IsGameController() call.
Regards,
Leszek
2013/11/22 T. Joseph Carter :> Sounds like you’re using a different driver and it’s giving you a different
GUID. What distribution/version? Also, can you generate a mapping string
for it?
Joseph
On Thu, Nov 21, 2013 at 04:11:57PM +0100, Leszek Godlewski wrote:
Well, I’m having a 100% repro rate using xpad here. Any suggestions
(apart from getting the debug symbols and seeing what’s happening
inside SDL_IsGameController for which I don’t have time at the
moment)?
Regards,
Leszek
2013/11/21 Gabriel Jacobo :
I just tested this with SDL from HG with the wireless receiver and the
xpad
driver.
testgamecontroller
INFO: Controller 0: X360 Wireless Controller (guid
030000005e0400001907000000010000)
INFO: Controller 1: X360 Wireless Controller (guid
030000005e0400001907000000010000)
INFO: Controller 2: X360 Wireless Controller (guid
030000005e0400001907000000010000)
INFO: Controller 3: X360 Wireless Controller (guid
030000005e0400001907000000010000)
INFO: There are 4 game controller(s) attached (4 joystick(s))
With the userspace xboxdrv (you need one instance per controller or so I
understood)
testgamecontroller
INFO: Joystick 0: Xbox Gamepad (userspace driver) (guid
0000000058626f782047616d65706100)
INFO: There are 0 game controller(s) attached (1 joystick(s))
So it seems the xboxdrv is not recognized by SDL as a controller (though
this driver is probably better, as the lights in the controller work as
they
should and it’s userspace based).
Gabriel.
2013/11/21 Leszek Godlewski <@Leszek_Godlewski>
Hi everyone,
I’m using SDL2 as provided in the Steam Linux Runtime and am baffled
by SDL_IsGameController() returning SDL_FALSE for the wireless X360
receiver. At the same time a regular, wired X360 controller works
perfectly with the game controller API. Is this an SDL bug or am I
forgetting about something?
Also, I’ve noticed that the receiver “preallocates” 4 joysticks
regardless of whether they’re connected or not. I don’t have an actual
controller at hand to test this, but will connecting a wireless
controller to the receiver generate hotplug SDL events? And will
SDL_GameControllerGetAttached() properly distinguish between connected
and disconnected wireless controllers?
The system is Debian amd64. I’m initializing the GC subsystem and as I
said, it works perfectly with wired controllers.
Thanks in advance!
Leszek
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Gabriel.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org