diff options
author | german <german@thesoftwareartisans.com> | 2020-09-26 00:58:27 +0200 |
---|---|---|
committer | german <german@thesoftwareartisans.com> | 2020-09-26 00:59:52 +0200 |
commit | 297823239026d1b5487f9b07f63646ca4a2e3a79 (patch) | |
tree | a08b8f0930f4a46d6853fb66d33bf15073613c0b /src/input_common/motion_from_button.h | |
parent | Add random motion input to SDL (diff) | |
download | yuzu-297823239026d1b5487f9b07f63646ca4a2e3a79.tar yuzu-297823239026d1b5487f9b07f63646ca4a2e3a79.tar.gz yuzu-297823239026d1b5487f9b07f63646ca4a2e3a79.tar.bz2 yuzu-297823239026d1b5487f9b07f63646ca4a2e3a79.tar.lz yuzu-297823239026d1b5487f9b07f63646ca4a2e3a79.tar.xz yuzu-297823239026d1b5487f9b07f63646ca4a2e3a79.tar.zst yuzu-297823239026d1b5487f9b07f63646ca4a2e3a79.zip |
Diffstat (limited to '')
-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 |