Add outer deadzone config (#2348)

* Add outer deadzone

* Documentation

* Add max outer deadzone to the controller remapping GUI

* Fix init values

* fix GUI saving syntax
This commit is contained in:
kalaposfos13
2025-02-05 16:26:14 +01:00
committed by GitHub
parent 00465d5e41
commit f5d64239cb
4 changed files with 57 additions and 31 deletions

View File

@@ -220,10 +220,10 @@ void ControlSettings::SaveControllerConfig(bool CloseOnSave) {
lines.push_back("# Range of deadzones: 1 (almost none) to 127 (max)");
std::string deadzonevalue = std::to_string(ui->LeftDeadzoneSlider->value());
lines.push_back("analog_deadzone = leftjoystick, " + deadzonevalue);
lines.push_back("analog_deadzone = leftjoystick, " + deadzonevalue + ", 127");
deadzonevalue = std::to_string(ui->RightDeadzoneSlider->value());
lines.push_back("analog_deadzone = rightjoystick, " + deadzonevalue);
lines.push_back("analog_deadzone = rightjoystick, " + deadzonevalue + ", 127");
std::vector<std::string> save;
bool CurrentLineEmpty = false, LastLineEmpty = false;

View File

@@ -167,9 +167,10 @@ You can find these here, with detailed comments, examples and suggestions for mo
You can make an input toggleable with this, for example: Let's say we want to be able to toggle l1 with t. You can then bind l1 to a key you won't use, like kpenter, then bind t to toggle that, so you will end up with this:
l1 = kpenter;
key_toggle = t, kpenter;
'analog_deadzone' = <device>, <value>;
value goes from 1 to 127 (no deadzone to max deadzone)
devices: leftjoystick, rightjoystick, l2, r2
'analog_deadzone' = <device>, <value>, <value>;
Values go from 1 to 127 (no deadzone to max deadzone), first is the inner, second is the outer deadzone
If you only want inner or outer deadzone, set the other to 1 or 127, respectively
Devices: leftjoystick, rightjoystick, l2, r2
)";
}
};