-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Controller not working under Linux with SDL2 (and an incomplete and nasty hack to fix it) #9825
Comments
This might be related the the "game controller db" not having your controller in it. I think there's another issue for this, and specifically there was some discussion that things not found in the db should fall back to some sane handling - which apparently is not currently happening. -[Unknown] |
I'll have a look into that. |
You could just handle hat directions as digital buttons, and inject them the same way, I think. Will just have to define a few new keycodes for them. They should probably not be analog axes. |
@marty1885 kernel 4.10 included support for DS4 v.2 which didn't have until then (only v1) |
@logos88 I know. But It just works. maybe some patches are added in my kernel. Or it might be some non-mainline driver I have been testing and I accidentally installed them. |
Hi guys, I have this same issue. Using an official PS3 controller works. But controller support does not work with a "Generic" version of the PS3 controller from Amazon. This "Generic" PS3-Like controller works for almost all of the other emulators and applications I've tried, such as dolphin-emu and desmume. It even works with PPSSPP on Wine, but that leads to other issues with running PPSSPP under Wine. As a developer, is there any way I can assist with getting this Generic Controller Support resolved @hrydgard @marty1885 ? |
@unknownbrackets @wodencafe |
@marty1885 Thanks for the info! Since you are working on the default behavior, I'll probably just look at this gamecontrollerdb.txt file and see if I can add my controller there. |
Same issue on macOS Sierra. |
Sorry, I don't know the format. I assumed there was some SDL tool to manage it, or something. I think it's related to this: https://github.com/gabomdq/SDL_GameControllerDB -[Unknown] |
@carlsmith What controller are you using? If you are using a DS4 Gen 2. I have it working trough USB now. And I'm trying to get BT to work on my laptop so I can test DS4 trough BT. Hopefully I can finish the test and open a PR for adding DS4 Gen2 soon. |
It's just a cheap, generic DualShock clone (USB). |
@marty1885 I have been encountering the exact same problem, and experimented around for a while (even opened another issue #9872) before I discovered this thread. I have found out another workaround that could solve the problem even easier. Go to this link, find the line that you need (in my case Sony Dualshock V2 for OS X) and put it into your @unknownbrackets thanks for pointing out that game controller DB repo, do you think it's a good idea to just use the updated version (or add it as a submodule or something)? |
I'm not against a submodule. I'm not sure if there's some benefit to keeping it separate, unless it needs to be in a specific directory. -[Unknown] |
@unknownbrackets Wrote a script and found out that changing to the submodule would result in the support for 5 controller disappearing (but adding a ton of new supported ones) |
@VVVFO you should contribute the 5 missing ones to https://github.com/gabomdq/SDL_GameControllerDB , send them a pull request or something. Then we can switch to that. |
I will try that, but judging from the number of pull request there are having, it's likely that this will take a long while. I think I should create a pull request for PPSSPP just in case anyone tries it before the migration, but only to find their controller does not work.
… On Aug 1, 2017, at 17:38, Henrik Rydgård ***@***.***> wrote:
@VVVFO you should contribute the 5 missing ones to https://github.com/gabomdq/SDL_GameControllerDB , send them a pull request or something. Then we can switch to that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@VVVFO Your fix kind of worked. For some reason my controller's ID wasn't in that linked database. I instead installed the Thanks for pointing me in the right direction! |
@binaryronin can you paste your mapping line here se we can add it? |
@hrydgard Sure, no problem!
|
I have needed to use controllermap to make my DS4 work too. This is my mapping: (Edited) |
Is this improved with #9997? Though, maybe we still need to pull in mappings from other projects. -[Unknown] |
Any news on support for 8bitdo controllers? The new SNES one has triggers, shoulder buttons, analogue sticks etc. and should ship in time for Christmas. 8bitdo have a solid reputation for build quality and compatibility, even pushing firmware updates to their pads when new consoles are released. They support most platforms, including mobile, and are becoming very popular with people who run emulators and stuff. Official support for 8bitdo controllers in PPSSPP would be awesome. I'm nothing to do with the company. I just have two control pads that don't work with PPSSPP, and would be gutted if my new one didn't work as well. |
They should work if you add the appropriate controllermap lines to gamecontrollerdb.txt, at least. Also I think we do autogenerate lines now for unknown controllers, have you tried to use them in recent builds? |
Thanks for taking the time to reply. I preordered the SF30 Pro for Dec 10th, and the other two pads are not by 8bitdo. One's from the Ouya, so it will probably never work. The other pad is a generic, fake PlayStation pad, so I'll test that with a more recent build. I wasn't blaming PPSSPP for my pads not working. They're both crap pads. It would just be gutting if the new pad didn't work too, as being able to play PPSSPP properly was a motivation for getting it. To be clear, PPSSPP is working on Mac, with good controller support, but only through OpenEmu. OpenEmu doesn't let users change emulator settings, so you have to run everything at 480 x 272. Given that it's written for OS X, and my 2013 MacBook Air 13 can run most games in PPSSPP at 1440 x 900 with anti-aliasing, without even running the fan, using PPSSPP through OpenEmu is pointless (unless you have a really old machine). It a shame we can't just reuse OpenEmu's controller support. |
Are the controllers still not working? -[Unknown] |
@unknownbrackets |
Thanks for the feedback. Since no one else has said anything on this issue in a year, I'm going to assume it's working better. I know several people have contributed additional gamecontrollerdb mappings as well. If anyone isn't seeing it working, please feel free to reply to this issue with details about your controller. If possible, it'd be great for you to try the SDL game controller db app and submit the additional line it creates to fix the issue for everyone. -[Unknown] |
Hello, I found that PPSSPP with SDL under Liunx don't response to my DS4 controller no matter what. Have anyone encounter this?
After digging into the source. I found that the events in
SDLJoystick.cpp
never happens and the controller seems not to be initialized in SDL. And I have come up with an incomplete and nasty hack to fix this. (link)(Good enough for playing Project DIVA) Which requires a controller to be connected to the PC when PPSSPP is launched.Is my patch going at the right direction? What should I improve so I could contribute this for PPSSPP?
OS: Arch Linux
Kernel: 4.11 AMD64
Compiler: GCC 7.1.1
Controller: DualShock4 Gen2
Interface: USB
The text was updated successfully, but these errors were encountered: