Prevent crash on connecting gamepad

This commit is contained in:
Brad Davis 2015-10-21 12:57:48 -07:00
parent ac2a60befb
commit 84e2ace0ea

View file

@ -129,6 +129,7 @@ void SDL2Manager::pluginUpdate(float deltaTime, bool jointsCaptured) {
if (!_openJoysticks.contains(id)) {
// Joystick* joystick = new Joystick(id, SDL_GameControllerName(controller), controller);
Joystick* joystick = new Joystick(id, controller);
_openJoysticks[id] = joystick;
userInputMapper->registerDevice(joystick);
emit joystickAdded(joystick);
}