sdl2
sdl2 copied to clipboard
Should getControllerID be removed?
I tried
cds <- SDL.availableControllers
gcs <- for cds SDL.openController
gcids <- for gcs SDL.getControllerID
which gave me
SDLCallFailed {sdlExceptionCaller = "SDL.Input.GameController.getControllerID", sdlFunction = "SDL_JoystickInstanceID", sdlExceptionError = "Parameter 'joystick' is invalid"}
After a little digging, I see the markdown for getControllerID has
See [SDL_GameControllerInstanceID](https://wiki.libsdl.org/SDL_GameControllerInstanceID) for C documentation.
but that function (SDL_GameControllerInstanceID) doesn't seem to exist.
And the binding actually calls "SDL_JoystickInstanceID" which expects a joystick, not a controller, hence the error.
So what is the point of this function? It doesn't seem to map to any SDL functionality. If the point is to match up a controller to an event, I believe the intention is to use SDL_GameControllerFromInstanceID (basically go the other way from instance id to controller).