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>2008-10-08 15:40:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-10-08 15:40:39 +0400
commit75f458022e87379def66743bb4fa43fdd478d298 (patch)
tree1ed4aa518e0005728b5fa1a09d231a283bb31078 /source/gameengine/GameLogic/SCA_JoystickSensor.cpp
parent53e046157dc38f841f5e879cfc9c766506d4834a (diff)
my changes broke the "level" option for joystick keys being held between states
Diffstat (limited to 'source/gameengine/GameLogic/SCA_JoystickSensor.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index bcd3aa842b7..3f95037d6e0 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -123,8 +123,8 @@ bool SCA_JoystickSensor::Evaluate(CValue* event)
numberof== m_axis -- max 2
*/
- if (!js->IsTrigAxis()) /* No events from SDL? - dont bother */
- return reset ? true : false;
+ if (!js->IsTrigAxis() && !reset) /* No events from SDL? - dont bother */
+ return false;
js->cSetPrecision(m_precision);
if (m_bAllEvents) {
@@ -189,8 +189,8 @@ bool SCA_JoystickSensor::Evaluate(CValue* event)
/* what is what!
m_button = the actual button in question
*/
- if (!js->IsTrigButton()) /* No events from SDL? - dont bother */
- return reset ? true : false;
+ if (!js->IsTrigButton() && !reset) /* No events from SDL? - dont bother */
+ return false;
if(( m_bAllEvents && js->aAnyButtonPressIsPositive()) || (!m_bAllEvents && js->aButtonPressIsPositive(m_button))) {
m_istrig = 1;
@@ -210,8 +210,8 @@ bool SCA_JoystickSensor::Evaluate(CValue* event)
direction= m_hatf -- max 12
*/
- if (!js->IsTrigHat()) /* No events from SDL? - dont bother */
- return reset ? true : false;
+ if (!js->IsTrigHat() && !reset) /* No events from SDL? - dont bother */
+ return false;
if(m_hat == 1){
if(js->aHatIsPositive(m_hatf)){