Add method to get the port number of a Joystick (#137)

This commit is contained in:
Austin Shalit
2016-07-04 09:18:28 -07:00
committed by Peter Johnson
parent 73602e6cb4
commit b036bf2e34
3 changed files with 17 additions and 0 deletions

View File

@@ -277,6 +277,13 @@ Joystick::HIDType Joystick::GetType() const {
*/
std::string Joystick::GetName() const { return m_ds.GetJoystickName(m_port); }
/**
* Get the port number of the joystick.
*
* @return The port number of the joystick.
*/
int Joystick::GetPort() const { return m_port; }
// int Joystick::GetAxisType(uint8_t axis) const
//{
// return m_ds.GetJoystickAxisType(m_port, axis);