summaryrefslogtreecommitdiff
path: root/src/input_common/motion_from_button.h
diff options
context:
space:
mode:
authorGravatar bunnei2020-10-08 10:18:39 -0700
committerGravatar GitHub2020-10-08 10:18:39 -0700
commit06e65de93cfa923b6fb1f12fa20193515249234d (patch)
tree9771ca19a2686af1185f62ed7488d977d37a1703 /src/input_common/motion_from_button.h
parentMerge pull request #4765 from ReinUsesLisp/fix-sort-devices (diff)
parentAdd random motion input to keyboard (diff)
downloadyuzu-06e65de93cfa923b6fb1f12fa20193515249234d.tar.gz
yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.tar.xz
yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.zip
Merge pull request #4677 from german77/ShakeFromButton
InputCommon: Add random motion input for buttons
Diffstat (limited to 'src/input_common/motion_from_button.h')
-rw-r--r--src/input_common/motion_from_button.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/input_common/motion_from_button.h b/src/input_common/motion_from_button.h
new file mode 100644
index 000000000..a959046fb
--- /dev/null
+++ b/src/input_common/motion_from_button.h
@@ -0,0 +1,25 @@
1// Copyright 2020 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/frontend/input.h"
8
9namespace InputCommon {
10
11/**
12 * An motion device factory that takes a keyboard button and uses it as a random
13 * motion device.
14 */
15class MotionFromButton final : public Input::Factory<Input::MotionDevice> {
16public:
17 /**
18 * Creates an motion device from button devices
19 * @param params contains parameters for creating the device:
20 * - "key": a serialized ParamPackage for creating a button device
21 */
22 std::unique_ptr<Input::MotionDevice> Create(const Common::ParamPackage& params) override;
23};
24
25} // namespace InputCommon