Files
dolphin/Source/Core/Core/HW/GCPadEmu.h
Lioncash 3a66f2c008 ControllerEmu: Move into its own directory
ControllerEmu is a massive class with a lot of nested public classes.

The only reason these are nested is because the outer class acts as a
namespace. There's no reason to keep these classes nested just for that.

Keeping these classes nested makes it impossible to forward declare them, which leads to quite a few includes in other headers, making compilation take
longer.

This moves the source files to their own directory so classes can be
separated as necessary to their own source files, and be namespaced under the
ControllerEmu namespace.
2017-02-07 22:12:06 -05:00

55 lines
1.0 KiB
C++

// Copyright 2010 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <string>
#include "InputCommon/ControllerEmu/ControllerEmu.h"
class ControlGroup;
enum class PadGroup
{
Buttons,
MainStick,
CStick,
DPad,
Triggers,
Rumble,
Mic,
Options
};
class GCPad : public ControllerEmu
{
public:
explicit GCPad(unsigned int index);
GCPadStatus GetInput() const;
void SetOutput(const ControlState strength);
bool GetMicButton() const;
std::string GetName() const override;
ControlGroup* GetGroup(PadGroup group);
void LoadDefaults(const ControllerInterface& ciface) override;
private:
Buttons* m_buttons;
AnalogStick* m_main_stick;
AnalogStick* m_c_stick;
Buttons* m_dpad;
MixedTriggers* m_triggers;
ControlGroup* m_rumble;
Buttons* m_mic;
ControlGroup* m_options;
const unsigned int m_index;
// Default analog stick radius for GameCube controllers.
static constexpr ControlState DEFAULT_PAD_STICK_RADIUS = 1.0;
};