2017-02-09 03:15:43 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-02-09 03:15:43 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2018-07-13 16:06:49 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2017-02-09 03:15:43 +00:00
|
|
|
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
|
2019-03-27 00:31:03 +00:00
|
|
|
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
|
2020-09-15 11:34:41 +00:00
|
|
|
#include "InputCommon/ControllerInterface/CoreDevice.h"
|
2017-02-09 03:15:43 +00:00
|
|
|
|
|
|
|
namespace ControllerEmu
|
|
|
|
{
|
|
|
|
class Triggers : public ControlGroup
|
|
|
|
{
|
|
|
|
public:
|
2018-07-13 16:06:49 +00:00
|
|
|
struct StateData
|
|
|
|
{
|
|
|
|
StateData() = default;
|
|
|
|
explicit StateData(std::size_t trigger_count) : data(trigger_count) {}
|
|
|
|
|
|
|
|
std::vector<ControlState> data;
|
|
|
|
};
|
|
|
|
|
2017-02-09 03:15:43 +00:00
|
|
|
explicit Triggers(const std::string& name);
|
|
|
|
|
2021-05-04 20:47:55 +00:00
|
|
|
StateData GetState() const;
|
2021-03-21 19:27:00 +00:00
|
|
|
StateData GetState(const InputOverrideFunction& override_func) const;
|
2019-03-27 00:31:03 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
SettingValue<double> m_deadzone_setting;
|
2017-02-09 03:15:43 +00:00
|
|
|
};
|
|
|
|
} // namespace ControllerEmu
|