Oh sorry I have not seen your link below the horizontal line.
Indeed, I have compiled it and it does not find my joystick:
So, it is probably a problem with SDL2.
I thought it was a problem with Qt so I have upgraded:
- qt-4.8.5 -> qt-4.8.7: result: same problem
- qt-4.8.7 -> qt-5.1.0: result: same problem
So, I really think it is not a Qt problem but a SDL2 problem.
I don't know why SDL2 does not find my joystick.
I have the last stable version.
Oh! I found! SDL2 requires root privileges to be able to see the controller:
Indeed, I have compiled it and it does not find my joystick:
Code:
$ gcc `pkg-config sdl2 --cflags --libs` testjoystick.c
$ ./a.out
There are 0 joysticks attachedSo, it is probably a problem with SDL2.
I thought it was a problem with Qt so I have upgraded:
- qt-4.8.5 -> qt-4.8.7: result: same problem
- qt-4.8.7 -> qt-5.1.0: result: same problem
So, I really think it is not a Qt problem but a SDL2 problem.
I don't know why SDL2 does not find my joystick.
I have the last stable version.
Oh! I found! SDL2 requires root privileges to be able to see the controller:
Code:
$ sudo ./a.out
There are 1 joysticks attached
Joystick 0: Xbox Gamepad (userspace driver)
axes: 2
balls: 0
hats: 0
buttons: 13
instance id: 0
guid: 0000000058626f782047616d65706100
