diff options
author | bunnei <bunneidev@gmail.com> | 2020-10-08 19:18:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 19:18:39 +0200 |
commit | 06e65de93cfa923b6fb1f12fa20193515249234d (patch) | |
tree | 9771ca19a2686af1185f62ed7488d977d37a1703 /src/input_common/motion_from_button.h | |
parent | Merge pull request #4765 from ReinUsesLisp/fix-sort-devices (diff) | |
parent | Add random motion input to keyboard (diff) | |
download | yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.tar yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.tar.gz yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.tar.bz2 yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.tar.lz yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.tar.xz yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.tar.zst yuzu-06e65de93cfa923b6fb1f12fa20193515249234d.zip |
Diffstat (limited to 'src/input_common/motion_from_button.h')
-rw-r--r-- | src/input_common/motion_from_button.h | 25 |
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 @@ +// Copyright 2020 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "core/frontend/input.h" + +namespace InputCommon { + +/** + * An motion device factory that takes a keyboard button and uses it as a random + * motion device. + */ +class MotionFromButton final : public Input::Factory<Input::MotionDevice> { +public: + /** + * Creates an motion device from button devices + * @param params contains parameters for creating the device: + * - "key": a serialized ParamPackage for creating a button device + */ + std::unique_ptr<Input::MotionDevice> Create(const Common::ParamPackage& params) override; +}; + +} // namespace InputCommon |