mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-22 09:11:21 +00:00
Adjust joystick axis enum
This commit is contained in:
parent
5a247bf375
commit
0db07cef0e
2 changed files with 4 additions and 4 deletions
|
@ -887,7 +887,7 @@ INT32 JoyAxis(joyaxis_e axissel)
|
||||||
if (retaxis > (+JOYAXISRANGE))
|
if (retaxis > (+JOYAXISRANGE))
|
||||||
retaxis = +JOYAXISRANGE;
|
retaxis = +JOYAXISRANGE;
|
||||||
|
|
||||||
if (!Joystick.bGamepadStyle && axissel > JA_DIGITAL)
|
if (!Joystick.bGamepadStyle && axissel >= JA_DIGITAL)
|
||||||
{
|
{
|
||||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_digitaldeadzone.value) >> FRACBITS;
|
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_digitaldeadzone.value) >> FRACBITS;
|
||||||
if (-jdeadzone < retaxis && retaxis < jdeadzone)
|
if (-jdeadzone < retaxis && retaxis < jdeadzone)
|
||||||
|
@ -962,7 +962,7 @@ INT32 Joy2Axis(joyaxis_e axissel)
|
||||||
if (retaxis > (+JOYAXISRANGE))
|
if (retaxis > (+JOYAXISRANGE))
|
||||||
retaxis = +JOYAXISRANGE;
|
retaxis = +JOYAXISRANGE;
|
||||||
|
|
||||||
if (!Joystick2.bGamepadStyle && axissel > JA_DIGITAL)
|
if (!Joystick2.bGamepadStyle && axissel >= JA_DIGITAL)
|
||||||
{
|
{
|
||||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_digitaldeadzone2.value) >> FRACBITS;
|
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_digitaldeadzone2.value) >> FRACBITS;
|
||||||
if (-jdeadzone < retaxis && retaxis < jdeadzone)
|
if (-jdeadzone < retaxis && retaxis < jdeadzone)
|
||||||
|
|
|
@ -93,9 +93,9 @@ typedef enum
|
||||||
JA_LOOK,
|
JA_LOOK,
|
||||||
JA_STRAFE,
|
JA_STRAFE,
|
||||||
|
|
||||||
JA_DIGITAL, // axes below this use digital deadzone
|
JA_DIGITAL, // axes henceforth use digital deadzone
|
||||||
|
|
||||||
JA_JUMP,
|
JA_JUMP = JA_DIGITAL,
|
||||||
JA_SPIN,
|
JA_SPIN,
|
||||||
JA_FIRE,
|
JA_FIRE,
|
||||||
JA_FIRENORMAL,
|
JA_FIRENORMAL,
|
||||||
|
|
Loading…
Reference in a new issue