x11: fix joysticks not recognizing some buttons

dpad on x360 pads with kernel < 4.3 is working now
This commit is contained in:
hinsbart 2016-02-24 12:18:30 +01:00 committed by Rémi Verschelde
parent 61f17fb1bb
commit f0ba9c7e78
1 changed files with 1 additions and 3 deletions

View File

@ -49,13 +49,11 @@ private:
JOYSTICKS_MAX = 16, JOYSTICKS_MAX = 16,
MAX_ABS = 63, MAX_ABS = 63,
MAX_KEY = 767, // Hack because <linux/input.h> can't be included here MAX_KEY = 767, // Hack because <linux/input.h> can't be included here
BT_MISC = 256,
HAT_MAX = 4,
}; };
struct Joystick { struct Joystick {
InputDefault::JoyAxis curr_axis[MAX_ABS]; InputDefault::JoyAxis curr_axis[MAX_ABS];
int key_map[MAX_KEY - BT_MISC]; int key_map[MAX_KEY];
int abs_map[MAX_ABS]; int abs_map[MAX_ABS];
int dpad; int dpad;
int fd; int fd;