diff options
| author | Scott Mansell <phiren@gmail.com> | 2021-05-14 20:51:33 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-14 20:51:33 +1200 |
| commit | 9f91fb64479d3df14489378a6b4fb3ffa7d12f2d (patch) | |
| tree | 702ec73b3745420750d05644c639f357492e57a1 /Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.h | |
| parent | 099bf16326c1549246fd1bd976fb1242e7ba0875 (diff) | |
| parent | f3ffac00583bd03d0620226392a2b15f3cfd273b (diff) | |
Merge pull request #9688 from Filoppi/input_cleanup
Input cleanup
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.h')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.h b/Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.h index 2139c2e2ca..13b52bb989 100644 --- a/Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.h +++ b/Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.h @@ -210,7 +210,7 @@ private: public: Button() : m_state(BUTTON_RELEASED) {} void SetState(ButtonState state) { m_state = state; } - bool Pressed() { return m_state == BUTTON_PRESSED; } + bool Pressed() const { return m_state == BUTTON_PRESSED; } ~Button() {} }; class Axis @@ -221,7 +221,7 @@ private: public: Axis() : m_value(0.0f) {} void SetValue(float value) { m_value = value; } - float AxisValue() { return m_value; } + float AxisValue() const { return m_value; } ~Axis() {} }; @@ -244,7 +244,7 @@ class InputDevice private: const std::string m_dev; std::map<ButtonType, bool> m_buttons; - std::map<ButtonType, float> m_axises; + std::map<ButtonType, float> m_axes; // Key is pad_id and ButtonType std::map<std::pair<int, ButtonType>, sBind*> m_input_binds; @@ -263,8 +263,8 @@ public: } bool PressEvent(int button, int action); void AxisEvent(int axis, float value); - bool ButtonValue(int pad_id, ButtonType button); - float AxisValue(int pad_id, ButtonType axis); + bool ButtonValue(int pad_id, ButtonType button) const; + float AxisValue(int pad_id, ButtonType axis) const; }; void Init(const std::string&); |
