Check if Joystick Button exists when requested and pass 0 and warn if it doesn't

Change-Id: I2194859ef8b263f1a20aba52ec154fb0a1fc8078
This commit is contained in:
Kevin O'Connor
2014-11-21 11:32:08 -05:00
parent 14a1e6ae8e
commit 7e5ed03d28
9 changed files with 41 additions and 26 deletions

View File

@@ -228,7 +228,7 @@ bool Joystick::GetBumper(JoystickHand hand)
**/
bool Joystick::GetRawButton(uint32_t button)
{
return ((0x1 << (button-1)) & m_ds->GetStickButtons(m_port)) != 0;
return m_ds->GetStickButton(m_port, button);
}
/**