Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-04-07 23:21:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-07 23:21:48 +0400
commitd012a222a21d4a2fb7f8879484755b89f80ecbb2 (patch)
tree2ce7e1bace5ae08d6cc0386fb7063faf777efebd /source/gameengine/GameLogic/SCA_JoystickSensor.cpp
parentca1c3be3029a7a7aada686372ca1dd6ab39f0547 (diff)
Some users have odd joysticks with more then 8 axises, increased to 16 (so 4 joysticks)
Ideally there would be no limit but I dont think its worth the effort. Also had a bug in last commit for the pytyhon api's "axisSingle" attribute, UI index starts at 1 not zero.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_JoystickSensor.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index 3df9b454b1d..fa61e057b2c 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -605,7 +605,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_axis_single(void *self_v, const KX_PYAT
return NULL;
}
- return PyInt_FromLong(joy->GetAxisPosition(self->m_axis));
+ return PyInt_FromLong(joy->GetAxisPosition(self->m_axis-1));
}
PyObject* SCA_JoystickSensor::pyattr_get_num_axis(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)