]> git.mxchange.org Git - flightgear.git/commitdiff
On a reinit() subsystem event, reconfigure the joystick and other
authordavid <david>
Thu, 24 Jun 2004 02:08:38 +0000 (02:08 +0000)
committerdavid <david>
Thu, 24 Jun 2004 02:08:38 +0000 (02:08 +0000)
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
src/Input/input.hxx

index dea8995c52eb7a5c818b1469c126bdc7aa96edb9..55a311e6066049bc05bee795cc9398c247c0007e 100644 (file)
@@ -179,6 +179,12 @@ FGInput::init ()
   fgRegisterMouseMotionHandler(mouseMotionHandler);
 }
 
+void
+FGInput::reinit ()
+{
+    init();
+}
+
 void 
 FGInput::update (double dt)
 {
index 755b6d66fd74c8a74f32edaaf190eb39982733a3..85403fa4ab8b65eb21dcd567e82d0f90033c3aea 100644 (file)
@@ -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 ();