forked from bartvdbraak/blender
my changes broke the "level" option for joystick keys being held between states
This commit is contained in:
parent
53e046157d
commit
75f458022e
@ -123,8 +123,8 @@ bool SCA_JoystickSensor::Evaluate(CValue* event)
|
|||||||
numberof== m_axis -- max 2
|
numberof== m_axis -- max 2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!js->IsTrigAxis()) /* No events from SDL? - dont bother */
|
if (!js->IsTrigAxis() && !reset) /* No events from SDL? - dont bother */
|
||||||
return reset ? true : false;
|
return false;
|
||||||
|
|
||||||
js->cSetPrecision(m_precision);
|
js->cSetPrecision(m_precision);
|
||||||
if (m_bAllEvents) {
|
if (m_bAllEvents) {
|
||||||
@ -189,8 +189,8 @@ bool SCA_JoystickSensor::Evaluate(CValue* event)
|
|||||||
/* what is what!
|
/* what is what!
|
||||||
m_button = the actual button in question
|
m_button = the actual button in question
|
||||||
*/
|
*/
|
||||||
if (!js->IsTrigButton()) /* No events from SDL? - dont bother */
|
if (!js->IsTrigButton() && !reset) /* No events from SDL? - dont bother */
|
||||||
return reset ? true : false;
|
return false;
|
||||||
|
|
||||||
if(( m_bAllEvents && js->aAnyButtonPressIsPositive()) || (!m_bAllEvents && js->aButtonPressIsPositive(m_button))) {
|
if(( m_bAllEvents && js->aAnyButtonPressIsPositive()) || (!m_bAllEvents && js->aButtonPressIsPositive(m_button))) {
|
||||||
m_istrig = 1;
|
m_istrig = 1;
|
||||||
@ -210,8 +210,8 @@ bool SCA_JoystickSensor::Evaluate(CValue* event)
|
|||||||
direction= m_hatf -- max 12
|
direction= m_hatf -- max 12
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!js->IsTrigHat()) /* No events from SDL? - dont bother */
|
if (!js->IsTrigHat() && !reset) /* No events from SDL? - dont bother */
|
||||||
return reset ? true : false;
|
return false;
|
||||||
|
|
||||||
if(m_hat == 1){
|
if(m_hat == 1){
|
||||||
if(js->aHatIsPositive(m_hatf)){
|
if(js->aHatIsPositive(m_hatf)){
|
||||||
|
Loading…
Reference in New Issue
Block a user