2 ms·
SDL has an event for when a new gamepad is detected or removed: http://wiki.libsdl.org/SDL_ControllerDeviceEvent http://wiki.libsdl.org/SDL_ControllerDeviceEven
by dkersten 5y ago
SDL has an event for when a new gamepad is detected or removed: http://wiki.libsdl.org/SDL_ControllerDeviceEvent http://wiki.libsdl.org/SDL_ControllerDeviceEvent although I don’t know what it does internally in order to detect this (well, the article describes what it does).
But you can also manually enumerate devices as in the example here: http://wiki.libsdl.org/SDL_GameControllerOpen http://wiki.libsdl.org/SDL_GameControllerOpen