Add gamepad button info to --gamepad-debug, from our current bug reports this looks like info we need
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7173 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
aac61a1b30
commit
fb8c9edf5e
@ -609,10 +609,15 @@ EventPropagation InputManager::input(const SEvent& event)
|
||||
for(int i=0; i<gp->m_button_count; i++)
|
||||
{
|
||||
const bool isButtonPressed = event.JoystickEvent.IsButtonPressed(i);
|
||||
|
||||
|
||||
// Only report button events when the state of the button changes
|
||||
if ((!gp->isButtonPressed(i) && isButtonPressed) || (gp->isButtonPressed(i) && !isButtonPressed))
|
||||
{
|
||||
if (UserConfigParams::m_gamepad_debug)
|
||||
{
|
||||
printf("button %i, status=%i\n", i, isButtonPressed);
|
||||
}
|
||||
|
||||
dispatchInput(Input::IT_STICKBUTTON, event.JoystickEvent.Joystick, i, Input::AD_POSITIVE,
|
||||
isButtonPressed ? Input::MAX_VALUE : 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user