mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 04:58:08 +02:00
Prevent crash on connecting gamepad
This commit is contained in:
parent
ac2a60befb
commit
84e2ace0ea
1 changed files with 1 additions and 0 deletions
|
@ -129,6 +129,7 @@ void SDL2Manager::pluginUpdate(float deltaTime, bool jointsCaptured) {
|
||||||
if (!_openJoysticks.contains(id)) {
|
if (!_openJoysticks.contains(id)) {
|
||||||
// Joystick* joystick = new Joystick(id, SDL_GameControllerName(controller), controller);
|
// Joystick* joystick = new Joystick(id, SDL_GameControllerName(controller), controller);
|
||||||
Joystick* joystick = new Joystick(id, controller);
|
Joystick* joystick = new Joystick(id, controller);
|
||||||
|
_openJoysticks[id] = joystick;
|
||||||
userInputMapper->registerDevice(joystick);
|
userInputMapper->registerDevice(joystick);
|
||||||
emit joystickAdded(joystick);
|
emit joystickAdded(joystick);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue