diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2019-10-06 09:44:46 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2019-10-06 09:56:39 -0500 |
| commit | 260cefd60b4fea09007e695819c018dd6171d0b1 (patch) | |
| tree | 7e5df93cdfa5ee63be93551afc02fca3bed1ee8a /Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp | |
| parent | b6545ea285b25765bbf464774f9a8e7649f6bc15 (diff) | |
WiimoteEmu: Expose maximum tilt acceleration.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp index 91089455f8..debca37bd1 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp @@ -7,6 +7,7 @@ #include <string> #include "Common/Common.h" +#include "Common/MathUtil.h" #include "InputCommon/ControlReference/ControlReference.h" #include "InputCommon/ControllerEmu/Control/Control.h" @@ -31,6 +32,14 @@ Tilt::Tilt(const std::string& name_) : ReshapableInput(name_, name_, GroupType:: // i18n: Refers to emulated wii remote movement. _trans("Maximum tilt angle.")}, 90, 0, 180); + + AddSetting(&m_max_rotational_velocity, + {_trans("Velocity"), + // i18n: The symbol/abbreviation for hertz (cycles per second). + _trans("Hz"), + // i18n: Refers to emulated wii remote movement. + _trans("Peak complete turns per second.")}, + 7, 1, 50); } Tilt::ReshapeData Tilt::GetReshapableState(bool adjusted) @@ -63,4 +72,9 @@ ControlState Tilt::GetDefaultInputRadiusAtAngle(double ang) const return SquareStickGate(1.0).GetRadiusAtAngle(ang); } +ControlState Tilt::GetMaxRotationalVelocity() const +{ + return m_max_rotational_velocity.GetValue() * MathUtil::TAU; +} + } // namespace ControllerEmu |
