Skip to content

Commit

Permalink
supress rx, ry axis events when heuristic for secondary stick is used
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Aug 26, 2023
1 parent afd78ea commit 3b3b3a0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/win/wjoydxnu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1532,19 +1532,19 @@ static void update_joystick(ALLEGRO_JOYSTICK_DIRECTX *joy)
const int dwOfs = item->dwOfs;
const DWORD dwData = item->dwData;

if (joy->rx_mapping.j && joy->rx_mapping.j == dwOfs)
handle_axis_event(joy, &joy->rx_mapping, dwData);
else if (joy->ry_mapping.j && joy->ry_mapping.j == dwOfs)
handle_axis_event(joy, &joy->ry_mapping, dwData);
else if (dwOfs == DIJOFS_X)
if (dwOfs == DIJOFS_X)
handle_axis_event(joy, &joy->x_mapping, dwData);
else if (dwOfs == DIJOFS_Y)
handle_axis_event(joy, &joy->y_mapping, dwData);
else if (dwOfs == DIJOFS_Z)
handle_axis_event(joy, &joy->z_mapping, dwData);
else if (dwOfs == DIJOFS_RX)
else if (joy->rx_mapping.j && joy->rx_mapping.j == dwOfs)
handle_axis_event(joy, &joy->rx_mapping, dwData);
else if (joy->ry_mapping.j && joy->ry_mapping.j == dwOfs)
handle_axis_event(joy, &joy->ry_mapping, dwData);
else if (joy->rx_mapping.j == 0 && dwOfs == DIJOFS_RX)
handle_axis_event(joy, &joy->rx_mapping, dwData);
else if (dwOfs == DIJOFS_RY)
else if (joy->rx_mapping.j == 0 && dwOfs == DIJOFS_RY)
handle_axis_event(joy, &joy->ry_mapping, dwData);
else if (dwOfs == DIJOFS_RZ)
handle_axis_event(joy, &joy->rz_mapping, dwData);
Expand Down

0 comments on commit 3b3b3a0

Please sign in to comment.