motion_from_button.h 727 B

12345678910111213141516171819202122232425
  1. // Copyright 2020 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "core/frontend/input.h"
  6. namespace InputCommon {
  7. /**
  8. * An motion device factory that takes a keyboard button and uses it as a random
  9. * motion device.
  10. */
  11. class MotionFromButton final : public Input::Factory<Input::MotionDevice> {
  12. public:
  13. /**
  14. * Creates an motion device from button devices
  15. * @param params contains parameters for creating the device:
  16. * - "key": a serialized ParamPackage for creating a button device
  17. */
  18. std::unique_ptr<Input::MotionDevice> Create(const Common::ParamPackage& params) override;
  19. };
  20. } // namespace InputCommon