From 25ac349fe4634dfa9f1c488503b178723d589ded Mon Sep 17 00:00:00 2001 From: david Date: Thu, 24 Jun 2004 02:08:38 +0000 Subject: [PATCH] On a reinit() subsystem event, reconfigure the joystick and other inputs. This makes it possible to hot-plug a new joystick while FlightGear is running (as long as the user explicitly reinits the input subsystem). --- src/Input/input.cxx | 6 ++++++ src/Input/input.hxx | 1 + 2 files changed, 7 insertions(+) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index dea8995c5..55a311e60 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -179,6 +179,12 @@ FGInput::init () fgRegisterMouseMotionHandler(mouseMotionHandler); } +void +FGInput::reinit () +{ + init(); +} + void FGInput::update (double dt) { diff --git a/src/Input/input.hxx b/src/Input/input.hxx index 755b6d66f..85403fa4a 100644 --- a/src/Input/input.hxx +++ b/src/Input/input.hxx @@ -194,6 +194,7 @@ public: // Implementation of SGSubsystem. // virtual void init (); + virtual void reinit (); virtual void update (double dt); virtual void suspend (); virtual void resume ();