Add "Analog trigger threshold" setting, for conversion of analog trigger inputs to digital button inputs.

This commit is contained in:
Henrik Rydgård committed 2023-12-28 13:36:03 +01:00
1 parent 15b5c7f6bf
commit 3895cfff74
9 files changed
+60 -11

No files matched your search

+4
View File
@@ -441,6 +441,10 @@ bool KeyMappingNewMouseKeyDialog::key(const KeyInput &key) {
return true;
}
// Only used during the bind process. In other places, it's configurable for some types of axis, like trigger.
const float AXIS_BIND_THRESHOLD = 0.75f;
const float AXIS_BIND_RELEASE_THRESHOLD = 0.35f; // Used during mapping only to detect a "key-up" reliably.
void KeyMappingNewKeyDialog::axis(const AxisInput &axis) {
if (time_now_d() < delayUntil_)
return;