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

Adding basic controller support #535

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adding basic controller support #535

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 8, 2017

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.

@jacob1
Copy link
Member

jacob1 commented Dec 8, 2017

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

@ghost
Copy link
Author

ghost commented Dec 8, 2017

Sounds good ! It currently is very rudimentary, i.e. moves cursor by a fixed amount, picks first available joystick etc

@jacob1
Copy link
Member

jacob1 commented Dec 8, 2017

How do you think it should work (first available joystick)? I don't use this controller much

@ghost
Copy link
Author

ghost commented Dec 8, 2017

I dont have a controller at the moment to verify, but using SDL1.2 i think the following would be the best solution:

  1. Get the number of available joysticks
  2. Get the name of the joysticks
  3. Then display those joysticks in a box/window and let the user pick the joystick they want

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.

@moonheart08
Copy link
Contributor

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.

@jacob1 jacob1 added the New feature not implemented but should be label Feb 24, 2018
@jacob1
Copy link
Member

jacob1 commented Apr 9, 2018

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)

@ChildishGiant
Copy link

Have you considered the snapping I meantioned in the linked issue?

@jacob1
Copy link
Member

jacob1 commented Apr 14, 2018

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

@ChildishGiant
Copy link

Yea that's what I meant. It'd be nice to make it more than just mouse simple mouse movement and clicks 😃

@LBPHacker
Copy link
Member

SDL 2 is now a thing, maybe it's time to revisit this?

@LBPHacker LBPHacker added the Work in progress ignore this for now label Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature not implemented but should be Work in progress ignore this for now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants