InputManager: Fix parsing sensor/accelerometer binding

This commit is contained in:
Connor McLaughlin 2022-08-15 23:53:52 +10:00
parent e9126aeeb8
commit c656f5cbd7

View file

@ -553,7 +553,7 @@ std::optional<InputBindingKey> InputManager::ParseSensorKey(const std::string_vi
key.source_subtype = InputSubclass::SensorAccelerometer; key.source_subtype = InputSubclass::SensorAccelerometer;
key.data = i; key.data = i;
const std::string_view dir_part(sub_binding.substr(std::strlen(s_pointer_axis_names[i]))); const std::string_view dir_part(sub_binding.substr(std::strlen(s_sensor_accelerometer_names[i])));
if (dir_part == "+") if (dir_part == "+")
key.negative = false; key.negative = false;
else if (dir_part == "-") else if (dir_part == "-")