summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
diff options
context:
space:
mode:
authorNick Michael <nickmichael@live.co.uk>2020-10-29 22:11:34 +0000
committerNick Michael <nickmichael@live.co.uk>2020-11-03 22:06:27 +0000
commit55dd3d73376746c4fc46df02d8266269a6e4537e (patch)
tree80d468b458af58fa7597fef1b17f5281ee7edb59 /Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
parentab8a128588b61f2651a567b42d298edb3052cefe (diff)
Virtual Notch settings and UI for octagonal stick
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
index a0157eec8f..881be39471 100644
--- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
+++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
@@ -65,6 +65,12 @@ OctagonAnalogStick::OctagonAnalogStick(const char* name_, const char* ui_name_,
ControlState gate_radius)
: AnalogStick(name_, ui_name_, std::make_unique<ControllerEmu::OctagonStickGate>(gate_radius))
{
+ AddVirtualNotchSetting(&m_virtual_notch_setting, 45);
+}
+
+ControlState OctagonAnalogStick::GetVirtualNotchSize() const
+{
+ return m_virtual_notch_setting.GetValue() * MathUtil::TAU / 360;
}
} // namespace ControllerEmu