From 8bea68c1a1ebc377906b4ee24f51069ad3f3399a Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Sat, 21 Feb 2009 18:02:55 +0000 Subject: [PATCH] Fixed haptic subsystem on linux 2.6.28 by lowering the EV_IsJoystick check (seems like some stuff was changed). Shouldn't break anything with earlier versions. Might need to be more robust if false positives show up. --- src/joystick/linux/SDL_sysjoystick.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index 6e17852cb..93e01ab2f 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -377,11 +377,11 @@ EV_IsJoystick(int fd) (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0)) { return (0); } + if (!(test_bit(EV_KEY, evbit) && test_bit(EV_ABS, evbit) && - test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit) && - (test_bit(BTN_TRIGGER, keybit) || test_bit(BTN_A, keybit) - || test_bit(BTN_1, keybit)))) + test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit))) { return 0; + } return (1); }