2017-02-08 22:15:43 -05:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
|
2017-04-04 15:37:31 -04:00
|
|
|
#include "InputCommon/ControllerInterface/Device.h"
|
2017-02-08 22:15:43 -05:00
|
|
|
|
|
|
|
namespace ControllerEmu
|
|
|
|
{
|
|
|
|
class AnalogStick : public ControlGroup
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
SETTING_RADIUS,
|
|
|
|
SETTING_DEADZONE,
|
|
|
|
};
|
|
|
|
|
2018-07-13 11:19:08 -04:00
|
|
|
struct StateData
|
|
|
|
{
|
|
|
|
ControlState x{};
|
|
|
|
ControlState y{};
|
|
|
|
};
|
|
|
|
|
2017-02-08 22:15:43 -05:00
|
|
|
// The GameCube controller and Wiimote attachments have a different default radius
|
|
|
|
AnalogStick(const char* name, ControlState default_radius);
|
|
|
|
AnalogStick(const char* name, const char* ui_name, ControlState default_radius);
|
|
|
|
|
2018-07-13 11:19:08 -04:00
|
|
|
StateData GetState();
|
2017-02-08 22:15:43 -05:00
|
|
|
};
|
|
|
|
} // namespace ControllerEmu
|