SDL_JoystickInstanceID always returns NIL for SDL_JoystickID

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SDL_JoystickInstanceID always returns NIL for SDL_JoystickID

danbarnes333
Hi guys,

I am having a problem with the gamepad / joystick interface in SDL2.

Because of the application I cannot use SDL events to manage the gamepads (which I realise would be more straight forward).

I want to keep track of gamepads using their SDL_JoystickID but when I try and retrieve this using SDL_JoystickInstanceID I always get nil as a response.

Here is a small snippet but hopefully enough to show the problem.



Am I using the interface incorrectly?

I can get the state of gamepad buttons and all other functions fine, just not the InstanceID, any ideas would be appreciated!

Thanks,

Dan

(OSX Sierra)[/img]

_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org