mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Use settings values for Input settings
This commit is contained in:
parent
5a27ccacb7
commit
6c18723bc7
13 changed files with 138 additions and 185 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue