summaryrefslogtreecommitdiffstats
path: root/src/input_common/motion_from_button.h
blob: a959046fb53cb2700ea2e54d3e7f2da2f645ec1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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