diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-08-10 00:37:53 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-10 00:37:53 +1000 |
| commit | 428ae5a43d8906782ab6388014dcfb4c2c5468d3 (patch) | |
| tree | e3898b0aa19d7a418cbf07e4ba90fb6c0b2dcf3c /Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp | |
| parent | 5c3e9a34c368c2ae775a88d02c53a7ad95396f67 (diff) | |
| parent | c62570c5272cff8f9c7add3a022d0d82078fbf78 (diff) | |
Merge pull request #8172 from nokturnusmf/relative-input-hold
Added (held) key for relative input
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp index 5e69f0bca0..93a6f4391a 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp @@ -31,6 +31,8 @@ Cursor::Cursor(std::string name, std::string ui_name) controls.emplace_back(std::make_unique<Input>(Translate, _trans("Hide"))); controls.emplace_back(std::make_unique<Input>(Translate, _trans("Recenter"))); + controls.emplace_back(std::make_unique<Input>(Translate, _trans("Relative Input Hold"))); + // Default values are optimized for "Super Mario Galaxy 2". // This seems to be acceptable for a good number of games. @@ -101,7 +103,7 @@ Cursor::StateData Cursor::GetState(const bool adjusted) const double max_step = STEP_PER_SEC / 1000.0 * ms_since_update; // Relative input: - if (m_relative_setting.GetValue()) + if (m_relative_setting.GetValue() ^ (controls[6]->control_ref->State() > BUTTON_THRESHOLD)) { // Recenter: if (controls[5]->control_ref->State() > BUTTON_THRESHOLD) |
