From: Frederic Bouvier Date: Sun, 30 Jan 2011 20:14:32 +0000 (+0100) Subject: Detect joystick disconnection X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=257e3390c94e52a085c11055be91cd12b65886be;p=flightgear.git Detect joystick disconnection --- diff --git a/src/Input/FGJoystickInput.cxx b/src/Input/FGJoystickInput.cxx index 17f1f3557..cf7cc3319 100644 --- a/src/Input/FGJoystickInput.cxx +++ b/src/Input/FGJoystickInput.cxx @@ -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++) {