]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/input.hxx
throw an exception if not even a default joystick could be found;
[flightgear.git] / src / Input / input.hxx
index 755b6d66fd74c8a74f32edaaf190eb39982733a3..faad8acdc2462eef1cbeffd87325306118055b87 100644 (file)
@@ -33,6 +33,7 @@
 
 #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>
@@ -194,6 +195,8 @@ public:
   // Implementation of SGSubsystem.
   //
   virtual void init ();
+  virtual void reinit ();
+  virtual void postinit ();
   virtual void update (double dt);
   virtual void suspend ();
   virtual void resume ();
@@ -358,6 +361,13 @@ private:
   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.
    */
@@ -371,6 +381,11 @@ private:
                            button &b,
                            const string name);
 
+  /**
+   * Initialize nasal parts that had to wait for the nasal to get
+   * functional.
+   */
+  void _postinit_joystick ();
 
   /**
    * Update the keyboard.