summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcpasjuste <cpasjuste@gmail.com>2020-04-24 09:59:06 +0200
committercpasjuste <cpasjuste@gmail.com>2020-04-24 09:59:06 +0200
commitfb95def24c42392fe79b6ab672b5a6edc7210195 (patch)
tree4802156f54de4e30418b984578b91d22d837d5de /src
parente124615493f4f84d372a99ea604220a8e850dde1 (diff)
downloadmanaverse-fb95def24c42392fe79b6ab672b5a6edc7210195.tar.gz
manaverse-fb95def24c42392fe79b6ab672b5a6edc7210195.tar.bz2
manaverse-fb95def24c42392fe79b6ab672b5a6edc7210195.tar.xz
manaverse-fb95def24c42392fe79b6ab672b5a6edc7210195.zip
switch: fix joystick directions
Diffstat (limited to 'src')
-rw-r--r--src/defaults.cpp2
-rw-r--r--src/input/joystick.cpp11
2 files changed, 5 insertions, 8 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index b566c3206..3ece72195 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -185,7 +185,7 @@ void setConfigDefaults(Configuration &cfg)
AddDEF("useScreenshotDirectorySuffix", true);
AddDEF("screenshotDirectorySuffix", "");
#ifdef __SWITCH__
- AddDEF("joystickEnabled", false);
+ AddDEF("joystickEnabled", true);
#else
AddDEF("joystickEnabled", false);
#endif
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp
index 814affa46..7b2eb7d7b 100644
--- a/src/input/joystick.cpp
+++ b/src/input/joystick.cpp
@@ -178,14 +178,11 @@ bool Joystick::open()
mButtonsNumber = MAX_BUTTONS;
#ifdef __SWITCH__
- /*
config.setValue("joystick" + toString(mNumber) + "calibrated", true);
- config.setValue("leftTolerance" + toString(mNumber), 1000);
- config.setValue("rightTolerance" + toString(mNumber), 1000);
- config.setValue("upTolerance" + toString(mNumber), 1000);
- config.setValue("downTolerance" + toString(mNumber), 1000);
- //config.setValue("useInactiveJoystick", true);
- */
+ config.setValue("leftTolerance" + toString(mNumber), -10000);
+ config.setValue("rightTolerance" + toString(mNumber), 10000);
+ config.setValue("upTolerance" + toString(mNumber), -10000);
+ config.setValue("downTolerance" + toString(mNumber), 10000);
#endif
mCalibrated = config.getValueBool("joystick"
+ toString(mNumber) + "calibrated", false);