1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +00:00

Fixes threshold for positive movement.

This commit is contained in:
Thomas Harte 2018-06-16 22:22:14 -04:00
parent 678bd93c52
commit 83a654540a

View File

@ -188,11 +188,11 @@ class ConcreteJoystick: public Joystick {
default: did_set_input(input, value > 0.5f); break; default: did_set_input(input, value > 0.5f); break;
case Type::Horizontal: case Type::Horizontal:
did_set_input(Input(Type::Left, input.info.control.index), value <= 0.25f); did_set_input(Input(Type::Left, input.info.control.index), value <= 0.25f);
did_set_input(Input(Type::Right, input.info.control.index), value >= 0.25f); did_set_input(Input(Type::Right, input.info.control.index), value >= 0.75f);
break; break;
case Type::Vertical: case Type::Vertical:
did_set_input(Input(Type::Up, input.info.control.index), value <= 0.25f); did_set_input(Input(Type::Up, input.info.control.index), value <= 0.25f);
did_set_input(Input(Type::Down, input.info.control.index), value >= 0.25f); did_set_input(Input(Type::Down, input.info.control.index), value >= 0.75f);
break; break;
} }
} }