Use settings values for Input settings

This commit is contained in:
elsid 2023-07-22 00:52:37 +02:00
parent 5a27ccacb7
commit 6c18723bc7
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
13 changed files with 138 additions and 185 deletions

View file

@ -464,4 +464,21 @@ namespace Settings
sInitialized.emplace(category, setting);
}
GyroscopeAxis parseGyroscopeAxis(std::string_view value)
{
if (value == "x")
return GyroscopeAxis::X;
else if (value == "y")
return GyroscopeAxis::Y;
else if (value == "z")
return GyroscopeAxis::Z;
else if (value == "-x")
return GyroscopeAxis::MinusX;
else if (value == "-y")
return GyroscopeAxis::MinusY;
else if (value == "-z")
return GyroscopeAxis::MinusZ;
throw std::runtime_error("Invalid gyroscope axis: " + std::string(value));
}
}