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
Adding basic controller support #535
base: master
Are you sure you want to change the base?
Conversation
This is really cool! Thanks for doing it. I'll test it later, I have a ps3 controller I use. I'll probably make some changes, I'd like every single button to be mapped to something. Related issue: #290 |
Sounds good ! It currently is very rudimentary, i.e. moves cursor by a fixed amount, picks first available joystick etc |
How do you think it should work (first available joystick)? I don't use this controller much |
I dont have a controller at the moment to verify, but using SDL1.2 i think the following would be the best solution:
As currently implemented it will just pick the first available joystick, so if you have two controllers plugged in you wont be able to select which one you want. |
I'll test in a little. I have a offbrand(!) XBox controller with rather silly precision on the joystick, so it'll make good testing. |
Still interested in this pull request, but I will probably just redo it whenever I upgrade to SDL 2 (keeping it open for now as a reminder, I won't upgrade for a while) |
Have you considered the snapping I meantioned in the linked issue? |
I haven't put too much thought into it, but having one control stick for selecting elements could be nice (is this what you were suggesting?). I would probably make it configurable, whatever I do. This PR is still on hold until SDL 2 |
Yea that's what I meant. It'd be nice to make it more than just mouse simple mouse movement and clicks 😃 |
SDL 2 is now a thing, maybe it's time to revisit this? |
Adding basic controller support, it will just grab the first available controller. Unfortunately, an XBox controller was the only controller available to test on. It has been tested on windows and on linux but not on macos.