#include <simgear/compiler.h>
+#include <simgear/misc/sg_path.hxx>
#include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/structure/commands.hxx>
#include <simgear/props/condition.hxx>
\f
#if defined( UL_WIN32 )
-#define TGT_PLATFORM "Windows"
+#define TGT_PLATFORM "windows"
+#elif defined ( UL_MAC_OSX )
+#define TGT_PLATFORM "mac"
#else
-#define TGT_PLATFORM "UNIX"
+#define TGT_PLATFORM "unix"
#endif
/**
* Destructor.
*/
- virtual ~FGBinding () {}
+ virtual ~FGBinding ();
/**
// Implementation of SGSubsystem.
//
virtual void init ();
+ virtual void reinit ();
+ virtual void postinit ();
virtual void update (double dt);
virtual void suspend ();
virtual void resume ();
SGPropertyNode * mouse_button_nodes[MAX_MOUSE_BUTTONS];
int nModes;
int current_mode;
+ double timeout;
+ int save_x;
+ int save_y;
mouse_mode * modes;
};
void _init_joystick ();
+ /**
+ * Scan directory recursively for "named joystick" configuration files,
+ * and read them into /input/joysticks/js-named[index]++.
+ */
+ void _scan_joystick_dir (SGPath *path, SGPropertyNode* node, int *index);
+
+
/**
* Initialize mouse bindings.
*/
button &b,
const string name);
+ /**
+ * Initialize nasal parts that had to wait for the nasal to get
+ * functional.
+ */
+ void _postinit_joystick ();
/**
* Update the keyboard.
/**
* Update the mouse.
*/
- void _update_mouse ();
+ void _update_mouse (double dt);
/**
joystick _joystick_bindings[MAX_JOYSTICKS];
mouse _mouse_bindings[MAX_MICE];
+ /**
+ * Nasal module name/namespace.
+ */
+ char _module[32];
};
#endif // _INPUT_HXX