diff options
author | Fernando S <fsahmkow27@gmail.com> | 2021-11-27 11:52:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-27 11:52:08 +0100 |
commit | 564f10527745f870621c08bbb5d16badee0ed861 (patch) | |
tree | e8ac8dee60086facf1837393882865f5df18c95e /src/input_common/motion_from_button.cpp | |
parent | 157985f55616c39c5605168f4e6cf50fd7384320 (diff) | |
parent | 182cd9004f75df21979d0edd47910fecbd129b63 (diff) |
Merge pull request #7255 from german77/kraken
Project Kraken: Input rewrite
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 29045a673f..0000000000 --- a/src/input_common/motion_from_button.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2020 yuzu Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include "input_common/motion_from_button.h" -#include "input_common/motion_input.h" - -namespace InputCommon { - -class MotionKey final : public Input::MotionDevice { -public: - using Button = std::unique_ptr<Input::ButtonDevice>; - - explicit MotionKey(Button key_) : key(std::move(key_)) {} - - Input::MotionStatus GetStatus() const override { - - if (key->GetStatus()) { - return motion.GetRandomMotion(2, 6); - } - return motion.GetRandomMotion(0, 0); - } - -private: - Button key; - InputCommon::MotionInput motion{0.0f, 0.0f, 0.0f}; -}; - -std::unique_ptr<Input::MotionDevice> MotionFromButton::Create(const Common::ParamPackage& params) { - auto key = Input::CreateDevice<Input::ButtonDevice>(params.Serialize()); - return std::make_unique<MotionKey>(std::move(key)); -} - -} // namespace InputCommon |