X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInput%2Fjsinput.h;h=73346e030afd6d294ef5cf9cf3789298c93d9e2a;hb=11d15b451347674fba77648700d23c5aaec3c6c2;hp=b5b0794aef87fd3ec5ea42bce9be9f767a8a579f;hpb=5430d87f01cc8d662e0e8d6dbbf67bf1c5324ad1;p=flightgear.git diff --git a/src/Input/jsinput.h b/src/Input/jsinput.h index b5b0794ae..73346e030 100644 --- a/src/Input/jsinput.h +++ b/src/Input/jsinput.h @@ -16,7 +16,7 @@ // // 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. @@ -32,29 +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