1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/openmw/mwinput/gyroaxis.cpp
2022-01-18 22:47:49 +01:00

23 lines
561 B
C++

#include "gyroaxis.hpp"
namespace MWInput
{
GyroscopeAxis gyroscopeAxisFromString(std::string_view s)
{
if (s == "x")
return GyroscopeAxis::X;
else if (s == "y")
return GyroscopeAxis::Y;
else if (s == "z")
return GyroscopeAxis::Z;
else if (s == "-x")
return GyroscopeAxis::Minus_X;
else if (s == "-y")
return GyroscopeAxis::Minus_Y;
else if (s == "-z")
return GyroscopeAxis::Minus_Z;
return GyroscopeAxis::Unknown;
}
}