1
0
Fork 0

Andreas Gaeb: make input (joystick) re-init work.

This commit is contained in:
James Turner 2011-01-29 16:05:02 +00:00
parent 86bb7f39f9
commit 2ea7f87ae1
2 changed files with 9 additions and 0 deletions

View file

@ -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");

View file

@ -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;