diff options
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/inputmanager.cpp | 3 | ||||
-rw-r--r-- | src/input/joystick.cpp | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index b470b66ac..f6e24f904 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -88,6 +88,9 @@ InputManager::InputManager() : void InputManager::init() restrict2 { +#ifdef __SWITCH__ + SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "1"); +#endif for (size_t i = 0; i < CAST_SIZE(InputAction::TOTAL); i ++) 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)); |