blob: 69cfd7d20220a1cee4219dd55b68f31f0af0a42f (
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
35
36
37
38
39
|
// Copyright 2017 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <string>
#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
#include "InputCommon/ControllerEmu/StickGate.h"
#include "InputCommon/ControllerInterface/CoreDevice.h"
namespace ControllerEmu
{
class Tilt : public ReshapableInput
{
public:
using StateData = ReshapeData;
explicit Tilt(const std::string& name);
ReshapeData GetReshapableState(bool adjusted) const final;
ControlState GetGateRadiusAtAngle(double angle) const final;
// Tilt is using the gate radius to adjust the tilt angle so we must provide an unadjusted value
// for the default input radius.
ControlState GetDefaultInputRadiusAtAngle(double angle) const final;
StateData GetState() const;
// Return peak rotational velocity (for a complete turn) in radians/sec
ControlState GetMaxRotationalVelocity() const;
private:
Control* GetModifierInput() const override;
SettingValue<double> m_max_angle_setting;
SettingValue<double> m_max_rotational_velocity;
};
} // namespace ControllerEmu
|