Merge pull request #1974 from flagrama/pj64-input-inverted-axis-checking-button
[Project64-Input] Fix inverted axis when checking pressed buttons
This commit is contained in:
commit
f6008997e7
|
@ -365,7 +365,7 @@ bool CDirectInput::IsButtonPressed(BUTTON & Button)
|
||||||
return JoyPadPovPressed((AI_POV)Button.AxisID, ((uint32_t *)&Device.State.Joy)[Button.Offset]);
|
return JoyPadPovPressed((AI_POV)Button.AxisID, ((uint32_t *)&Device.State.Joy)[Button.Offset]);
|
||||||
case BTNTYPE_JOYSLIDER:
|
case BTNTYPE_JOYSLIDER:
|
||||||
case BTNTYPE_JOYAXE:
|
case BTNTYPE_JOYAXE:
|
||||||
return Button.AxisID ? ((uint32_t *)&Device.State.Joy)[Button.Offset] < AXIS_TOP_VALUE : ((uint32_t *)&Device.State.Joy)[Button.Offset] > AXIS_BOTTOM_VALUE;
|
return Button.AxisID ? ((uint32_t*)&Device.State.Joy)[Button.Offset] > AXIS_BOTTOM_VALUE : ((uint32_t *)&Device.State.Joy)[Button.Offset] < AXIS_TOP_VALUE;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue