Commit dd682a64 authored by Edgar Simo's avatar Edgar Simo

Fixed haptic subsystem on linux 2.6.28 by lowering the EV_IsJoystick check...

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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403545
parent 755e92af
...@@ -377,11 +377,11 @@ EV_IsJoystick(int fd) ...@@ -377,11 +377,11 @@ EV_IsJoystick(int fd)
(ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0)) { (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0)) {
return (0); return (0);
} }
if (!(test_bit(EV_KEY, evbit) && test_bit(EV_ABS, evbit) && if (!(test_bit(EV_KEY, evbit) && test_bit(EV_ABS, evbit) &&
test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit) && 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))))
return 0; return 0;
}
return (1); return (1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment