summaryrefslogtreecommitdiff
path: root/src/input_common/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/helpers')
-rw-r--r--src/input_common/helpers/stick_from_buttons.cpp3
-rw-r--r--src/input_common/helpers/stick_from_buttons.h3
-rw-r--r--src/input_common/helpers/touch_from_buttons.cpp4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/input_common/helpers/stick_from_buttons.cpp b/src/input_common/helpers/stick_from_buttons.cpp
index 38f150746..89ba4aeb1 100644
--- a/src/input_common/helpers/stick_from_buttons.cpp
+++ b/src/input_common/helpers/stick_from_buttons.cpp
@@ -251,7 +251,8 @@ private:
251 std::chrono::time_point<std::chrono::steady_clock> last_update; 251 std::chrono::time_point<std::chrono::steady_clock> last_update;
252}; 252};
253 253
254std::unique_ptr<Input::InputDevice> StickFromButton::Create(const Common::ParamPackage& params) { 254std::unique_ptr<Input::InputDevice> StickFromButton::Create(
255 const Common::ParamPackage& params) {
255 const std::string null_engine = Common::ParamPackage{{"engine", "null"}}.Serialize(); 256 const std::string null_engine = Common::ParamPackage{{"engine", "null"}}.Serialize();
256 auto up = Input::CreateDeviceFromString<Input::InputDevice>(params.Get("up", null_engine)); 257 auto up = Input::CreateDeviceFromString<Input::InputDevice>(params.Get("up", null_engine));
257 auto down = Input::CreateDeviceFromString<Input::InputDevice>(params.Get("down", null_engine)); 258 auto down = Input::CreateDeviceFromString<Input::InputDevice>(params.Get("down", null_engine));
diff --git a/src/input_common/helpers/stick_from_buttons.h b/src/input_common/helpers/stick_from_buttons.h
index 1d6e24c98..87165e022 100644
--- a/src/input_common/helpers/stick_from_buttons.h
+++ b/src/input_common/helpers/stick_from_buttons.h
@@ -25,7 +25,8 @@ public:
25 * - "modifier": a serialized ParamPackage for creating a button device as the modifier 25 * - "modifier": a serialized ParamPackage for creating a button device as the modifier
26 * - "modifier_scale": a float for the multiplier the modifier gives to the position 26 * - "modifier_scale": a float for the multiplier the modifier gives to the position
27 */ 27 */
28 std::unique_ptr<Input::InputDevice> Create(const Common::ParamPackage& params) override; 28 std::unique_ptr<Input::InputDevice> Create(
29 const Common::ParamPackage& params) override;
29}; 30};
30 31
31} // namespace InputCommon 32} // namespace InputCommon
diff --git a/src/input_common/helpers/touch_from_buttons.cpp b/src/input_common/helpers/touch_from_buttons.cpp
index 2abfaf841..6c9046ffb 100644
--- a/src/input_common/helpers/touch_from_buttons.cpp
+++ b/src/input_common/helpers/touch_from_buttons.cpp
@@ -57,7 +57,9 @@ private:
57 const Input::AnalogProperties properties{0.0f, 1.0f, 0.5f, 0.0f, false}; 57 const Input::AnalogProperties properties{0.0f, 1.0f, 0.5f, 0.0f, false};
58}; 58};
59 59
60std::unique_ptr<Input::InputDevice> TouchFromButton::Create(const Common::ParamPackage& params) { 60
61std::unique_ptr<Input::InputDevice> TouchFromButton::Create(
62 const Common::ParamPackage& params) {
61 const std::string null_engine = Common::ParamPackage{{"engine", "null"}}.Serialize(); 63 const std::string null_engine = Common::ParamPackage{{"engine", "null"}}.Serialize();
62 auto button = 64 auto button =
63 Input::CreateDeviceFromString<Input::InputDevice>(params.Get("button", null_engine)); 65 Input::CreateDeviceFromString<Input::InputDevice>(params.Get("button", null_engine));