1
0
Fork 0

If js is valid (again), create a new instance of jsJoystick so removing an joystick from and USB port and attaching it again get the joystick in a working order.

This commit is contained in:
Erik Hofman 2020-01-26 17:44:19 +01:00
parent d4459c8205
commit 2d0b44ee63

View file

@ -342,6 +342,10 @@ void FGJoystickInput::updateJoystick(int index, FGJoystickInput::joystick* joy,
jsJoystick * js = joy->plibJS.get();
if (js == 0 || js->notWorking()) {
initializing[index] = true;
if (js) {
jsJoystick * js = new jsJoystick(index);
joysticks[index].plibJS.reset(js);
}
return;
}