Detect joystick disconnection
This commit is contained in:
parent
287cc74965
commit
257e3390c9
1 changed files with 2 additions and 0 deletions
|
@ -275,6 +275,8 @@ void FGJoystickInput::update( double dt )
|
|||
continue;
|
||||
|
||||
js->read(&buttons, axis_values);
|
||||
if (js->notWorking()) // If js is disconnected
|
||||
continue;
|
||||
|
||||
// Fire bindings for the axes.
|
||||
for (int j = 0; j < bindings[i].naxes; j++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue