Andreas Gaeb: make input (joystick) re-init work.
This commit is contained in:
parent
86bb7f39f9
commit
2ea7f87ae1
2 changed files with 9 additions and 0 deletions
|
@ -119,6 +119,14 @@ void FGJoystickInput::init()
|
|||
}
|
||||
}
|
||||
|
||||
void FGJoystickInput::reinit() {
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, "Re-Initializing joystick bindings");
|
||||
SGPropertyNode * js_nodes = fgGetNode("/input/joysticks", true);
|
||||
js_nodes->removeChildren("js", false);
|
||||
FGJoystickInput::init();
|
||||
FGJoystickInput::postinit();
|
||||
}
|
||||
|
||||
void FGJoystickInput::postinit()
|
||||
{
|
||||
FGNasalSys *nasalsys = (FGNasalSys *)globals->get_subsystem("nasal");
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
|
||||
virtual void init();
|
||||
virtual void postinit();
|
||||
virtual void reinit();
|
||||
virtual void update( double dt );
|
||||
|
||||
static const int MAX_JOYSTICKS = 10;
|
||||
|
|
Loading…
Reference in a new issue