# HG changeset patch # User Edgar Simo # Date 1235239375 0 # Node ID cfc8b35ad6b1a86faa99cca37cb29dce98d42415 # Parent 81d15ace9129fc13851f48b85a80d53f577c2e76 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. diff -r 81d15ace9129 -r cfc8b35ad6b1 src/joystick/linux/SDL_sysjoystick.c --- a/src/joystick/linux/SDL_sysjoystick.c Thu Feb 19 06:49:59 2009 +0000 +++ b/src/joystick/linux/SDL_sysjoystick.c Sat Feb 21 18:02:55 2009 +0000 @@ -377,11 +377,11 @@ (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); }