]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/jsinput.h
fix a pointer reference.
[flightgear.git] / src / Input / jsinput.h
index b173a3a714064a557a533046be89dda61e37b77f..73346e030afd6d294ef5cf9cf3789298c93d9e2a 100644 (file)
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 
 
 #ifndef _JSINPUT_H
 #define _JSINPUT_H
 
-#include <jssuper.h>
-#include <plib/js.h>
+#include "jssuper.h"
 
 class jsInput {
   private:
@@ -33,27 +32,30 @@ class jsInput {
     float axes[_JS_MAX_AXES];
     float axes_iv[MAX_JOYSTICKS][_JS_MAX_AXES];
     int button_iv[MAX_JOYSTICKS];
-    
+
     int joystick,axis,button;
-    
+    bool axis_positive;
+
     float axis_threshold;
-    
+
   public:
     jsInput(jsSuper *jss);
-    ~jsInput(void); 
-    
+    ~jsInput(void);
+
     inline void displayValues(bool bb) { pretty_display=bb; }
-    
+
     int getInput(void);
-    
+    void findDeadBand(void);
+
     inline int getInputJoystick(void) { return joystick; }
     inline int getInputAxis(void)     { return axis; }
     inline int getInputButton(void)   { return button; }
-    
+    inline bool getInputAxisPositive(void) { return axis_positive; }
+
     inline float getReturnThreshold(void) { return axis_threshold; }
-    inline void setReturnThreshold(float ff) 
+    inline void setReturnThreshold(float ff)
               { if(fabs(ff) <= 1.0) axis_threshold=ff; }
-};    
+};
 
 
 #endif