mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-13 06:10:50 +00:00
make menu respond to joystick axis events without joyscale having to be 0
This commit is contained in:
parent
591fd8d6db
commit
9ea0df0986
1 changed files with 22 additions and 16 deletions
14
src/m_menu.c
14
src/m_menu.c
|
@ -2116,28 +2116,34 @@ boolean M_Responder(event_t *ev)
|
|||
{
|
||||
if (ev->type == ev_joystick && ev->data1 == 0 && joywait < I_GetTime())
|
||||
{
|
||||
if (ev->data3 == -1)
|
||||
if (ev->data3 != INT32_MAX)
|
||||
{
|
||||
if (ev->data3 < 0)
|
||||
{
|
||||
ch = KEY_UPARROW;
|
||||
joywait = I_GetTime() + NEWTICRATE/7;
|
||||
}
|
||||
else if (ev->data3 == 1)
|
||||
else if (ev->data3 > 0)
|
||||
{
|
||||
ch = KEY_DOWNARROW;
|
||||
joywait = I_GetTime() + NEWTICRATE/7;
|
||||
}
|
||||
}
|
||||
|
||||
if (ev->data2 == -1)
|
||||
if (ev->data2 != INT32_MAX)
|
||||
{
|
||||
if (ev->data2 < 0)
|
||||
{
|
||||
ch = KEY_LEFTARROW;
|
||||
joywait = I_GetTime() + NEWTICRATE/17;
|
||||
}
|
||||
else if (ev->data2 == 1)
|
||||
else if (ev->data2 > 0)
|
||||
{
|
||||
ch = KEY_RIGHTARROW;
|
||||
joywait = I_GetTime() + NEWTICRATE/17;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ev->type == ev_mouse && mousewait < I_GetTime())
|
||||
{
|
||||
pmousey += ev->data3;
|
||||
|
|
Loading…
Reference in a new issue