Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Xbox360 Controller is not recognized by ppsspp 1.0.1 (Qt)
#1
Hello,

I have compiled ppsspp v1.0.1 (Qt version) on Slackware 14.1 and I am able to launch a video game but my joystick seems to not be recognized.
I go to settings > controls > control mapping > Dpad Up > then I push any button of my joystick and it does not interact at all with ppsspp.

Any idea why?

My joystick is: 045e:028e Microsoft Corp. Xbox360 Controller
My driver is: xboxdrv 0.8.5
It is working good on all my other applications.

It seems that there is a relationship with sdl2 (already installed on my system) and my joystick problem.
Here you can see that my sdl2 library is correctly recognized while I am compiling ppsspp:

PPSSPP.pro:
Code:
[...] macx|equals(PLATFORM_NAME, "linux") { PRE_TARGETDEPS += $$CONFIG_DIR/libCommon.a $$CONFIG_DIR/libCore.a $$CONFIG_DIR/libGPU.a $$CONFIG_DIR/libNative.a CONFIG += link_pkgconfig packagesExist(sdl2) { DEFINES += SDL SOURCES += $$P/SDL/SDLJoystick.cpp HEADERS += $$P/SDL/SDLJoystick.h PKGCONFIG += sdl2 macx { LIBS += -F/Library/Frameworks -framework SDL INCLUDEPATH += /Library/Frameworks/SDL.framework/Versions/A/Headers } error(---joystick---) # <--- added line } } [...]
I have added a line to trigger an error if it is found and the error is displayed when I launch the build.
So the joystick feature should be enabled, isn't it?

Thank you.
Best regards.
Reply
#2
Moved.
♦ Intel Core i7-6700HQ | 16 GB RAM | NVIDIA GeForce GTX 960M | Debian Testing
♦ Intel Core i7-2630QM | 4 GB RAM | NVIDIA GeForce GT 540M | Debian Testing
♦ PSP-3004 | 6.60 PRO-C2
Reply
#3
I quickly recompiled the newest version on Ubuntu14.04 and tested it with the only controller I have lying around, a PS3 controller (054c:0268) and it works fine.

I guess you can try to download this test https://github.com/zielmicha/SDL2/blob/m...joystick.c and compile it (simply "gcc testjoystick.c -I/usr/include/SDL2 -lSDL2" ) and tell us what the output is with your gamepad attached
Reply
#4
Can you tell me more about what you call "the newest version"?
Have you used the last version (release 1.0.1, corresponding to git commit 8c8e5de89d52b8bcb968227d96cbf049d04d1241) or the last commit on git?

I am in the first case and what about you?

If you don't know, tell me how you get your version (giving the link you followed and/or the button you pressed and/or the command you typed).
Reply
#5
Anyway I have just tried with the last commit too:
- 268aed482d5a9471195491ced58d4231211c0b6f (2015-05-31)
instead of :
- 8c8e5de89d52b8bcb968227d96cbf049d04d1241 (2015-02-26)

And I have exactly the same behavior: my Xbox360 controller does not work.

I think the problem can be related to:
- SDL2 (2.0.3 installed on my system)
- Qt (4.8.5 installed on my system)
- xboxdrv (0.8.5 installed on my system)

Please tell me what version you are currently using it can help me a lot.
Reply
#6
I meant the current most master at the time I posted which was 05-27-2015 and since there were no recent changes to the controller handling you can assume that it's still the same.

Did you try to run that SDL2 joystick detection program that I linked to?

edit: oh and Qt is not involved in the controller handling, so you can exclude that
Reply
#7
Oh sorry I have not seen your link below the horizontal line.
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 attached

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:
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
Reply
#8
In fact, this is a permission problem on the device (/dev/input/event*) created by xboxdrv.
A solution is to create an udev rule in a new file:
Code:
$ cat /etc/udev/rules.d/71-xboxdrv.rules KERNEL=="event*", MODE="0666"

Now, I am able to run the test program without sudo:
Code:
$ ./a.out There are 1 joysticks attached Joystick 0: Microsoft X-Box 360 pad axes: 6 balls: 0 hats: 1 buttons: 11 instance id: 0 guid: 030000005e0400008e02000014010000

Thank you a lot Bigpet for the test program.
Problem solved.
Reply
#9
Hi !

I have the same problem with my xbox360 (wired).
I'm on a Ubuntu 14.04 based system (Elementary OS Freya) and PPSSPP 1.1.

Your solution doesn't function for my system...

I have the testjoystick installed and run, it detects my pads :
./a.out
There are 2 joysticks attached
Joystick 0: Microsoft X-Box 360 pad
axes: 6
balls: 0
hats: 1
buttons: 11
instance id: 0
guid: 030000005e0400008e02000014010000
Joystick 1: Microsoft X-Box 360 pad
axes: 6
balls: 0
hats: 1
buttons: 11
instance id: 1
guid: 030000005e0400008e02000014010000

But the pads doesn't recognize the buttons, i have only directions... (udev rules created)
Reply
#10
Maybe you are not using the same driver than me.
You can try this in console:
Code:
$ sudo rmmod xpad $ sudo killall xboxdrv $ sudo xboxdrv &

This will unload the "xpad" module, kill all "xboxdrv" processes then start one time the "xboxdrv" driver.

You can also check the version of "xboxdrv" you are using:
Code:
$ xboxdrv --version xboxdrv 0.8.5 - [...]
Reply


Forum Jump: