summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControlGroup/Triggers.h
blob: 107b94c6f8e54c9b8da5cce0ff054618c462565c (plain)
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
26
27
28
29
30
31
32
33
34
// Copyright 2017 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include <string>
#include <vector>

#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
#include "InputCommon/ControllerInterface/Device.h"

namespace ControllerEmu
{
class Triggers : public ControlGroup
{
public:
  struct StateData
  {
    StateData() = default;
    explicit StateData(std::size_t trigger_count) : data(trigger_count) {}

    std::vector<ControlState> data;
  };

  explicit Triggers(const std::string& name);

  StateData GetState();

private:
  SettingValue<double> m_deadzone_setting;
};
}  // namespace ControllerEmu