Hi! I’d really like to see Joy-Cons supported properly. In controller_type.h we have this:
// We currently don't support using a pair of Switch Joy-Con's as a single // controller and we don't want to support using them individually for the // time being, so these should be disabled until one of the above is true
It seems to me that putting off proper Joy-Con support until there’s a way to combine controllers is putting the cart before the horse. If SDL had Joy-Con support but not controller-combining, a user who’s happy to do controller combining on their end can make good use of it. Many devs are already doing something like this in single-player games where the player accepts input from multiple devices (and kinds of devices) at once. And as long as users are able to query whether a given device is a Joy-Con (and whether it’s left or right), they can easily do any special-case handling they might need.
Joy-Cons communicate almost identically to the Switch Pro Controller, with essentially the only difference being the axes for the motion sensors (which can easily be fixed). It should be very easy to treat them as Pro Controllers with few exceptions (getting the controller name, re-arranging motion axes if and when Switch controllers support the Sensor functions).
Now I must acknowledge that I’m an SDL newbie, but my background is having created another controller reading tool specifically for PlayStation and Switch controllers and providing good support for their motion features (gyro in particular). SDL supports far more controllers than my library does, and this is one of very few holes that need to be plugged up for SDL to meet all the needs of my library’s users (which would be great!).
Of course, since Joy-Cons are already crudely supported in a different way (held sideways and with the sticks reporting as pov hats ), for backwards compatibility reasons we can’t just change it. I’m not great at names, but I propose:
- A hint to enable better Joy-Con support: SDL_SetHint(SDL_HINT_GAMECONTROLLER_HIDAPI_JOY_CONS, “1”);
- A way to check if the controller is only partial (although SDL_GameControllerHasButton could do the trick, or checking the names, since for now there are really very few partial controllers out there)
- Joy-Con motion axes re-orientated as if held in a pair. (It’s trivial for the user to re-arrange these again for single-Joy-Con sideways play, and consistency across devices is a very appealing feature of SDL).