summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2015-09-06 19:21:59 +1200
committerScott Mansell <phiren@gmail.com>2015-09-06 19:21:59 +1200
commit61da83182ee21d8675739b7317ee1ae73e33692d (patch)
tree50524bdb8873887850edea0a3559e29fbcb45002 /Source/Core/InputCommon/ControllerInterface
parent728d082bc72cb1449291b6cae20cce1cce1dca92 (diff)
parent22635c1800c7c4fd803b3954e20777c43fd590ba (diff)
Merge pull request #2978 from lioncash/override
Add missing override specifiers
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h24
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h32
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h3
-rw-r--r--Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp2
-rw-r--r--Source/Core/InputCommon/ControllerInterface/XInput/XInput.h30
5 files changed, 46 insertions, 45 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
index c89ba509d3..3064051101 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
@@ -20,9 +20,9 @@ private:
class Button : public Input
{
public:
- std::string GetName() const;
- Button(u8 index, const BYTE& button) : m_index(index), m_button(button) {}
- ControlState GetState() const;
+ Button(u8 index, const BYTE& button) : m_button(button), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const BYTE& m_button;
const u8 m_index;
@@ -31,9 +31,9 @@ private:
class Axis : public Input
{
public:
- std::string GetName() const;
- Axis(u8 index, const LONG& axis, LONG base, LONG range) : m_index(index), m_axis(axis), m_base(base), m_range(range) {}
- ControlState GetState() const;
+ Axis(u8 index, const LONG& axis, LONG base, LONG range) : m_axis(axis), m_base(base), m_range(range), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const LONG& m_axis;
const LONG m_base, m_range;
@@ -43,9 +43,9 @@ private:
class Hat : public Input
{
public:
- std::string GetName() const;
- Hat(u8 index, const DWORD& hat, u8 direction) : m_index(index), m_hat(hat), m_direction(direction) {}
- ControlState GetState() const;
+ Hat(u8 index, const DWORD& hat, u8 direction) : m_hat(hat), m_direction(direction), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const DWORD& m_hat;
const u8 m_index, m_direction;
@@ -57,9 +57,9 @@ public:
Joystick(const LPDIRECTINPUTDEVICE8 device, const unsigned int index);
~Joystick();
- std::string GetName() const;
- int GetId() const;
- std::string GetSource() const;
+ std::string GetName() const override;
+ int GetId() const override;
+ std::string GetSource() const override;
private:
const LPDIRECTINPUTDEVICE8 m_device;
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
index db4d363df0..14d885ff94 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
@@ -32,9 +32,9 @@ private:
class Key : public Input
{
public:
- std::string GetName() const;
- Key(u8 index, const BYTE& key) : m_index(index), m_key(key) {}
- ControlState GetState() const;
+ Key(u8 index, const BYTE& key) : m_key(key), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const BYTE& m_key;
const u8 m_index;
@@ -43,9 +43,9 @@ private:
class Button : public Input
{
public:
- std::string GetName() const;
- Button(u8 index, const BYTE& button) : m_index(index), m_button(button) {}
- ControlState GetState() const;
+ Button(u8 index, const BYTE& button) : m_button(button), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const BYTE& m_button;
const u8 m_index;
@@ -54,9 +54,9 @@ private:
class Axis : public Input
{
public:
- std::string GetName() const;
- Axis(u8 index, const LONG& axis, LONG range) : m_index(index), m_axis(axis), m_range(range) {}
- ControlState GetState() const;
+ Axis(u8 index, const LONG& axis, LONG range) : m_axis(axis), m_range(range), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const LONG& m_axis;
const LONG m_range;
@@ -66,10 +66,10 @@ private:
class Cursor : public Input
{
public:
- std::string GetName() const;
- bool IsDetectable() { return false; }
- Cursor(u8 index, const ControlState& axis, const bool positive) : m_index(index), m_axis(axis), m_positive(positive) {}
- ControlState GetState() const;
+ Cursor(u8 index, const ControlState& axis, const bool positive) : m_axis(axis), m_index(index), m_positive(positive) {}
+ std::string GetName() const override;
+ bool IsDetectable() override { return false; }
+ ControlState GetState() const override;
private:
const ControlState& m_axis;
const u8 m_index;
@@ -82,9 +82,9 @@ public:
KeyboardMouse(const LPDIRECTINPUTDEVICE8 kb_device, const LPDIRECTINPUTDEVICE8 mo_device);
~KeyboardMouse();
- std::string GetName() const;
- int GetId() const;
- std::string GetSource() const;
+ std::string GetName() const override;
+ int GetId() const override;
+ std::string GetSource() const override;
private:
const LPDIRECTINPUTDEVICE8 m_kb_device;
diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h
index a528c00602..57364bd160 100644
--- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h
+++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h
@@ -29,9 +29,10 @@ private:
class Force : public Output
{
public:
- std::string GetName() const;
Force(const std::string& name, LPDIRECTINPUTEFFECT iface);
~Force();
+
+ std::string GetName() const override;
void SetState(ControlState state);
void Update();
void Stop();
diff --git a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp
index 0e2c0bcad3..1ee374d483 100644
--- a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp
@@ -122,7 +122,7 @@ void DeInit()
}
Device::Device(const XINPUT_CAPABILITIES& caps, u8 index)
- : m_index(index), m_subtype(caps.SubType)
+ : m_subtype(caps.SubType), m_index(index)
{
ZeroMemory(&m_state_out, sizeof(m_state_out));
diff --git a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h
index 5dcfb0cee5..59a3f6ff79 100644
--- a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h
+++ b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h
@@ -32,9 +32,9 @@ private:
class Button : public Core::Device::Input
{
public:
- std::string GetName() const;
- Button(u8 index, const WORD& buttons) : m_index(index), m_buttons(buttons) {}
- ControlState GetState() const;
+ Button(u8 index, const WORD& buttons) : m_buttons(buttons), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const WORD& m_buttons;
u8 m_index;
@@ -43,9 +43,9 @@ private:
class Axis : public Core::Device::Input
{
public:
- std::string GetName() const;
- Axis(u8 index, const SHORT& axis, SHORT range) : m_index(index), m_axis(axis), m_range(range) {}
- ControlState GetState() const;
+ Axis(u8 index, const SHORT& axis, SHORT range) : m_axis(axis), m_range(range), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const SHORT& m_axis;
const SHORT m_range;
@@ -55,9 +55,9 @@ private:
class Trigger : public Core::Device::Input
{
public:
- std::string GetName() const;
- Trigger(u8 index, const BYTE& trigger, BYTE range) : m_index(index), m_trigger(trigger), m_range(range) {}
- ControlState GetState() const;
+ Trigger(u8 index, const BYTE& trigger, BYTE range) : m_trigger(trigger), m_range(range), m_index(index) {}
+ std::string GetName() const override;
+ ControlState GetState() const override;
private:
const BYTE& m_trigger;
const BYTE m_range;
@@ -67,9 +67,9 @@ private:
class Motor : public Core::Device::Output
{
public:
- std::string GetName() const;
- Motor(u8 index, Device* parent, WORD &motor, WORD range) : m_index(index), m_parent(parent), m_motor(motor), m_range(range) {}
- void SetState(ControlState state);
+ Motor(u8 index, Device* parent, WORD &motor, WORD range) : m_motor(motor), m_range(range), m_index(index), m_parent(parent) {}
+ std::string GetName() const override;
+ void SetState(ControlState state) override;
private:
WORD& m_motor;
const WORD m_range;
@@ -82,9 +82,9 @@ public:
Device(const XINPUT_CAPABILITIES& capabilities, u8 index);
- std::string GetName() const;
- int GetId() const;
- std::string GetSource() const;
+ std::string GetName() const override;
+ int GetId() const override;
+ std::string GetSource() const override;
void UpdateMotors();