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

Implement joystick support #1

roblabla opened this Issue Jan 25, 2018 · 2 comments


None yet
2 participants
Copy link

roblabla commented Jan 25, 2018

It'd be nice to have joystick support, so we can use SDL's nice abstractions for it. I'll write up some implementation notes if someone wants to pick this one up.

This is a Good First Issue (I don't have the rights to add tags on issues here 😞 )


This comment has been minimized.

Copy link

awernick commented May 2, 2018

I'm interested in helping out! I haven't been keeping up with all the developments that have been happening with the Switch lately, but summer is coming so I'll have extra time to catch up and contribute!
How can I help?


This comment has been minimized.

Copy link
Member Author

roblabla commented May 2, 2018

So for joystick support, you'll want to make a switch folder in here, which is where you'll put your implementation. Copying dummy can be a good starting point. It's then mostly a matter of filling up the method with implementations. Look at the header to know what each function must do.

Some specifics:

  • Call hid's hid_init in JoystickInit.
  • get_shared_memory_handle is basically instantaneous, you shouldn't need to cache it or whatever.
  • SDL_SYS_JoystickDetect is used to detect new joysticks plugged in. It's called every tick. MIght want to just not implement it at first, from experience it's a bit of a pain to get right.

If you have some specific questions, feel free to reply or ping me on reswitched's discord :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.