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).
This commit is contained in:
parent
258cd292c6
commit
25ac349fe4
2 changed files with 7 additions and 0 deletions
|
@ -179,6 +179,12 @@ FGInput::init ()
|
|||
fgRegisterMouseMotionHandler(mouseMotionHandler);
|
||||
}
|
||||
|
||||
void
|
||||
FGInput::reinit ()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
void
|
||||
FGInput::update (double dt)
|
||||
{
|
||||
|
|
|
@ -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 ();
|
||||
|
|
Loading…
Reference in a new issue