mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
InputCommon: add a ton of missing consts
fix some related grammar errors only the ButtonManager required code changes
This commit is contained in:
@ -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&);
|
||||
|
Reference in New Issue
Block a user