diff options
| author | Matthew Parlane <parlane@gmail.com> | 2013-01-28 22:00:47 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2013-01-28 22:00:47 +1300 |
| commit | 2dd077028fdaa296827864e70252b4e992b26c65 (patch) | |
| tree | 6a65b5dc0c1566239f603bf1590a2eace73b46e6 /Source/Core/InputCommon | |
| parent | ed9ef874e581aa2ff5c47ec58e7b741e160b026e (diff) | |
| parent | a8d4c78cec87e864cfa5410f14687d13308e38d7 (diff) | |
Merge branch 'master' into wii-network
Diffstat (limited to 'Source/Core/InputCommon')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerEmu.cpp | 1 | ||||
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerEmu.h | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerEmu.cpp b/Source/Core/InputCommon/Src/ControllerEmu.cpp index 9065888d7d..2e6ad10617 100644 --- a/Source/Core/InputCommon/Src/ControllerEmu.cpp +++ b/Source/Core/InputCommon/Src/ControllerEmu.cpp @@ -295,6 +295,7 @@ ControllerEmu::Tilt::Tilt(const char* const _name) settings.push_back(new Setting(_trans("Dead Zone"), 0, 0, 50)); settings.push_back(new Setting(_trans("Circle Stick"), 0)); + settings.push_back(new Setting(_trans("Angle"), 0.9f, 0, 180)); } ControllerEmu::Cursor::Cursor(const char* const _name) diff --git a/Source/Core/InputCommon/Src/ControllerEmu.h b/Source/Core/InputCommon/Src/ControllerEmu.h index 888e0c7fa9..6084a610a1 100644 --- a/Source/Core/InputCommon/Src/ControllerEmu.h +++ b/Source/Core/InputCommon/Src/ControllerEmu.h @@ -307,6 +307,7 @@ public: ControlState deadzone = settings[0]->value; ControlState circle = settings[1]->value; + auto const angle = settings[2]->value / 1.8f; ControlState m = controls[4]->control_ref->State(); // modifier code @@ -363,8 +364,8 @@ public: m_tilt[1] = std::max(m_tilt[1] - 0.1f, yy); } - *y = C(m_tilt[1] * range + base); - *x = C(m_tilt[0] * range + base); + *y = C(m_tilt[1] * angle * range + base); + *x = C(m_tilt[0] * angle * range + base); } private: float m_tilt[2]; |
