2013-04-17 22:43:11 -04:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2010-06-12 17:15:16 +00:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2010-06-13 09:14:40 +00:00
|
|
|
#include <string>
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2014-02-17 05:18:15 -05:00
|
|
|
#include "InputCommon/ControllerEmu.h"
|
2010-06-03 18:05:08 +00:00
|
|
|
|
|
|
|
class GCPad : public ControllerEmu
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-01-14 03:05:02 +00:00
|
|
|
GCPad(const unsigned int index);
|
2014-07-10 22:02:32 -04:00
|
|
|
void GetInput(GCPadStatus* const pad);
|
2012-12-30 13:41:48 +11:00
|
|
|
void SetOutput(const u8 on);
|
2013-01-07 12:25:18 +11:00
|
|
|
void SetMotor(const u8 on);
|
2011-10-09 04:27:43 -05:00
|
|
|
|
|
|
|
bool GetMicButton() const;
|
2013-10-29 01:23:17 -04:00
|
|
|
|
2013-10-29 01:34:26 -04:00
|
|
|
std::string GetName() const override;
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2013-10-29 01:34:26 -04:00
|
|
|
void LoadDefaults(const ControllerInterface& ciface) override;
|
2010-06-03 18:05:08 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2014-02-16 15:30:18 -05:00
|
|
|
Buttons* m_buttons;
|
|
|
|
AnalogStick* m_main_stick;
|
|
|
|
AnalogStick* m_c_stick;
|
|
|
|
Buttons* m_dpad;
|
|
|
|
MixedTriggers* m_triggers;
|
|
|
|
ControlGroup* m_rumble;
|
|
|
|
ControlGroup* m_options;
|
|
|
|
|
|
|
|
const unsigned int m_index;
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2014-08-15 13:03:56 -04:00
|
|
|
// TODO: Make constexpr when VS supports it.
|
|
|
|
//
|
|
|
|
// Default analog stick radius for GameCube controllers.
|
|
|
|
static const ControlState DEFAULT_PAD_STICK_RADIUS;
|
2010-06-03 18:05:08 +00:00
|
|
|
};
|