Skip to content
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

SDL2 Controller Database Support #8986

Closed
neilmunday opened this issue Sep 15, 2016 · 5 comments
Closed

SDL2 Controller Database Support #8986

neilmunday opened this issue Sep 15, 2016 · 5 comments

Comments

@neilmunday
Copy link
Contributor

Hi,

SDL2 supports loading control pad (joystick) mappings from a "controller database", see https://github.com/gabomdq/SDL_GameControllerDB which can then be loaded using the SDL_GameControllerAddMappingsFromFile SDL2 function.

I've used this in some of my own projects together with the SDL2 GameController API to make life a lot easier when incorporating control pad support into my SDL2 based apps.

Would it be possble to add such support to PPSSPP?

Thanks,

Neil.

@unknownbrackets
Copy link
Collaborator

Would you be interested in submitting a pull request?

-[Unknown]

@neilmunday
Copy link
Contributor Author

Sure. I've almost got something working, just need to do some testing with some other models of control pad to be sure. If all goes well I'll create a pull request.

I should add that C/C++ isn't my main language so I apologise in advance!

@unknownbrackets
Copy link
Collaborator

Sounds great - thanks. C/C++ isn't my main language either, actually, but that's what code review is for, heh.

As long as non-SDL isn't really changed, I think it can only be better. This could be related to #7847 and #8849.

-[Unknown]

@neilmunday
Copy link
Contributor Author

neilmunday commented Sep 18, 2016

Pull requested submitted: #8993

As well as the SDL code, I had to update ext/native/base/PCMain.cpp to enabled SDL2's game controller support as well as adding a copy of the game controller database to the assets directory.

Seems to work for me under Linux with PS3 and XBOX 360 control pads.

Let me know what you think.

Cheers,

Neil.

@neilmunday
Copy link
Contributor Author

As the pull request has been merged, this issue can now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants