From 664d628cbcbf2428bf6158eb940ca1e4b6a97b75 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 5 Apr 2018 21:04:40 +0200 Subject: [PATCH] device: D-Pad mappings for DualShock 3 driver on Linux --- panda/src/device/evdevInputDevice.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/device/evdevInputDevice.cxx b/panda/src/device/evdevInputDevice.cxx index cae448c1f3..5e2be61a95 100644 --- a/panda/src/device/evdevInputDevice.cxx +++ b/panda/src/device/evdevInputDevice.cxx @@ -971,15 +971,19 @@ map_button(int code, DeviceClass device_class) { case BTN_THUMBR: return GamepadButton::rstick(); + case BTN_DPAD_LEFT: case BTN_TRIGGER_HAPPY1: return GamepadButton::dpad_left(); + case BTN_DPAD_RIGHT: case BTN_TRIGGER_HAPPY2: return GamepadButton::dpad_right(); + case BTN_DPAD_UP: case BTN_TRIGGER_HAPPY3: return GamepadButton::dpad_up(); + case BTN_DPAD_DOWN: case BTN_TRIGGER_HAPPY4: return GamepadButton::dpad_down();