mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 03:51:50 +00:00
G_MapEventsToControls: On second thought, only handle reassignment when a trigger axis is activated, to closer match button behaviour.
This commit is contained in:
parent
1acf00daa6
commit
6832488117
1 changed files with 10 additions and 10 deletions
|
|
@ -467,21 +467,21 @@ void G_MapEventsToControls(event_t *ev)
|
|||
|
||||
i = ev->data1;
|
||||
|
||||
if (AutomaticControllerReassignmentIsAllowed(ev->device)
|
||||
&& (abs(ev->data2) > JOYAXISRANGE/2 || abs(ev->data3) > JOYAXISRANGE/2))
|
||||
{
|
||||
INT32 assigned = AssignDeviceToFirstUnassignedPlayer(ev->device);
|
||||
if (assigned >= 0)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, "Player %d device was reassigned\n", assigned + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= JOYANALOGS)
|
||||
{
|
||||
// The trigger axes are handled specially.
|
||||
i -= JOYANALOGS;
|
||||
|
||||
if (AutomaticControllerReassignmentIsAllowed(ev->device)
|
||||
&& (abs(ev->data2) > JOYAXISRANGE/2 || abs(ev->data3) > JOYAXISRANGE/2))
|
||||
{
|
||||
INT32 assigned = AssignDeviceToFirstUnassignedPlayer(ev->device);
|
||||
if (assigned >= 0)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, "Player %d device was reassigned\n", assigned + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (ev->data2 != INT32_MAX)
|
||||
{
|
||||
DeviceGameKeyDownArray[KEY_AXIS1 + (JOYANALOGS * 4) + (i * 2)] = max(0, ev->data2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue