diff options
author | ewewukek <ewewukek@gmail.com> | 2024-01-10 23:11:14 +0300 |
---|---|---|
committer | ewewukek <ewewukek@gmail.com> | 2024-03-27 13:18:30 +0300 |
commit | 55f9902343eff790c420ca3724c02e95664a9d25 (patch) | |
tree | e28e36935c70c6f9397f818ed35b6138d36df973 /src/input/joystick.cpp | |
parent | 531cf122d42900453102862caf94119c60d7f077 (diff) | |
download | manaverse-55f9902343eff790c420ca3724c02e95664a9d25.tar.gz manaverse-55f9902343eff790c420ca3724c02e95664a9d25.tar.bz2 manaverse-55f9902343eff790c420ca3724c02e95664a9d25.tar.xz manaverse-55f9902343eff790c420ca3724c02e95664a9d25.zip |
Add a slider to joystick settings to set axis tolerance
Diffstat (limited to 'src/input/joystick.cpp')
-rw-r--r-- | src/input/joystick.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp index 5396adadc..48b4488b0 100644 --- a/src/input/joystick.cpp +++ b/src/input/joystick.cpp @@ -198,12 +198,12 @@ bool Joystick::open() #ifdef __SWITCH__ config.setValue("joystick" + toString(mNumber) + "calibrated", true); - config.setValue("joystickTolerance" + toString(mNumber), 10000); + config.setValue("joystickTolerance", 10000); #endif mCalibrated = config.getValueBool("joystick" + toString(mNumber) + "calibrated", false); - mTolerance = config.getIntValue("joystickTolerance" + toString(mNumber)); + mTolerance = config.getIntValue("joystickTolerance"); mUseInactive = config.getBoolValue("useInactiveJoystick"); return true; @@ -341,7 +341,7 @@ void Joystick::finishCalibration() mCalibrated = true; mCalibrating = false; config.setValue("joystick" + toString(mNumber) + "calibrated", true); - config.setValue("joystickTolerance" + toString(mNumber), mTolerance); + config.setValue("joystickTolerance", mTolerance); } bool Joystick::buttonPressed(const unsigned char no) const |