diff options
| author | 2021-09-20 17:39:58 -0500 | |
|---|---|---|
| committer | 2021-11-24 20:30:23 -0600 | |
| commit | 6d108f0dcb5b388c3586f90426fc2c832a8bffc0 (patch) | |
| tree | c32a8451e9a87121058d5eb6a7b9aa72fdb99a3c /src/input_common/motion_from_button.cpp | |
| parent | input_common: Rewrite SDL (diff) | |
| download | yuzu-6d108f0dcb5b388c3586f90426fc2c832a8bffc0.tar.gz yuzu-6d108f0dcb5b388c3586f90426fc2c832a8bffc0.tar.xz yuzu-6d108f0dcb5b388c3586f90426fc2c832a8bffc0.zip | |
input_common: Remove obsolete files
Diffstat (limited to 'src/input_common/motion_from_button.cpp')
| -rw-r--r-- | src/input_common/motion_from_button.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/input_common/motion_from_button.cpp b/src/input_common/motion_from_button.cpp deleted file mode 100644 index 29045a673..000000000 --- a/src/input_common/motion_from_button.cpp +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | // Copyright 2020 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "input_common/motion_from_button.h" | ||
| 6 | #include "input_common/motion_input.h" | ||
| 7 | |||
| 8 | namespace InputCommon { | ||
| 9 | |||
| 10 | class MotionKey final : public Input::MotionDevice { | ||
| 11 | public: | ||
| 12 | using Button = std::unique_ptr<Input::ButtonDevice>; | ||
| 13 | |||
| 14 | explicit MotionKey(Button key_) : key(std::move(key_)) {} | ||
| 15 | |||
| 16 | Input::MotionStatus GetStatus() const override { | ||
| 17 | |||
| 18 | if (key->GetStatus()) { | ||
| 19 | return motion.GetRandomMotion(2, 6); | ||
| 20 | } | ||
| 21 | return motion.GetRandomMotion(0, 0); | ||
| 22 | } | ||
| 23 | |||
| 24 | private: | ||
| 25 | Button key; | ||
| 26 | InputCommon::MotionInput motion{0.0f, 0.0f, 0.0f}; | ||
| 27 | }; | ||
| 28 | |||
| 29 | std::unique_ptr<Input::MotionDevice> MotionFromButton::Create(const Common::ParamPackage& params) { | ||
| 30 | auto key = Input::CreateDevice<Input::ButtonDevice>(params.Serialize()); | ||
| 31 | return std::make_unique<MotionKey>(std::move(key)); | ||
| 32 | } | ||
| 33 | |||
| 34 | } // namespace InputCommon | ||