From 256f611bbd40ba8f5b9821e104b9f48d97f6455d Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 4 Sep 2011 23:01:59 +0000 Subject: [PATCH] Fixed resetAxisDirection resetting buttons that happened to have the same ID as the axis being resetted git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9743 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/input/input_device.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/input/input_device.cpp b/src/input/input_device.cpp index 0f031cf72..245ad54c0 100644 --- a/src/input/input_device.cpp +++ b/src/input/input_device.cpp @@ -139,7 +139,9 @@ void GamePadDevice::resetAxisDirection(const int axis, for(int n=0; ngetBinding(n); - if(bind.getId() == axis && bind.getDirection()== direction) + if(bind.getType() == Input::IT_STICKMOTION && + bind.getId() == axis && + bind.getDirection()== direction) { ((PlayerController*)(pk->getController()))->action((PlayerAction)n, 0); return;