Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Linux: Fix DualShock3 D-Pad not working #873

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Linux/LinuxGameController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ bool LinuxGameController::IsButtonPressed(int buttonNumber)
case 24: return CheckAxis(ABS_RZ, true);
case 25: return CheckAxis(ABS_RZ, false);

case 26: return CheckAxis(ABS_HAT0X, true);
case 27: return CheckAxis(ABS_HAT0X, false);
case 28: return CheckAxis(ABS_HAT0Y, true);
case 29: return CheckAxis(ABS_HAT0Y, false);
case 26: return CheckAxis(ABS_HAT0X, true) || (libevdev_get_event_value(_device, EV_KEY, BTN_DPAD_RIGHT) == 1);
case 27: return CheckAxis(ABS_HAT0X, false) || (libevdev_get_event_value(_device, EV_KEY, BTN_DPAD_LEFT) == 1);
case 28: return CheckAxis(ABS_HAT0Y, true) || (libevdev_get_event_value(_device, EV_KEY, BTN_DPAD_DOWN) == 1);
case 29: return CheckAxis(ABS_HAT0Y, false) || (libevdev_get_event_value(_device, EV_KEY, BTN_DPAD_UP) == 1);
case 30: return CheckAxis(ABS_HAT1X, true);
case 31: return CheckAxis(ABS_HAT1X, false);
case 32: return CheckAxis(ABS_HAT1Y, true);
Expand Down