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:
parent
d4459c8205
commit
2d0b44ee63
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue