diff options
author | cpasjuste <cpasjuste@gmail.com> | 2020-04-22 18:19:18 +0200 |
---|---|---|
committer | cpasjuste <cpasjuste@gmail.com> | 2020-04-22 18:19:18 +0200 |
commit | eeb40fb079971ece6288e5210e42a9cc3fc95790 (patch) | |
tree | 0c9a1e45861dbdec7a344b6280831527f71f5ca2 /src/input/joystick.cpp | |
parent | f43e3aa48aeb561f5c7e85f1b7121aab6a61decd (diff) | |
download | manaverse-eeb40fb079971ece6288e5210e42a9cc3fc95790.tar.gz manaverse-eeb40fb079971ece6288e5210e42a9cc3fc95790.tar.bz2 manaverse-eeb40fb079971ece6288e5210e42a9cc3fc95790.tar.xz manaverse-eeb40fb079971ece6288e5210e42a9cc3fc95790.zip |
switch: enable joystick and mouse
Diffstat (limited to 'src/input/joystick.cpp')
-rw-r--r-- | src/input/joystick.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp index 1492ba09b..34f2619b9 100644 --- a/src/input/joystick.cpp +++ b/src/input/joystick.cpp @@ -177,8 +177,17 @@ bool Joystick::open() if (mButtonsNumber > MAX_BUTTONS) mButtonsNumber = MAX_BUTTONS; +#ifdef __SWITCH__ + config.setValue("joystick" + toString(mNumber) + "calibrated", true); + config.setValue("leftTolerance" + toString(mNumber), 100); + config.setValue("rightTolerance" + toString(mNumber), 100); + config.setValue("upTolerance" + toString(mNumber), 100); + config.setValue("downTolerance" + toString(mNumber), 100); + config.setValue("useInactiveJoystick", true); +#endif mCalibrated = config.getValueBool("joystick" + toString(mNumber) + "calibrated", false); + mUpTolerance = config.getIntValue("upTolerance" + toString(mNumber)); mDownTolerance = config.getIntValue("downTolerance" + toString(mNumber)); mLeftTolerance = config.getIntValue("leftTolerance" + toString(mNumber)); |