Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed haptic subsystem on linux 2.6.28 by lowering the EV_IsJoystick …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
bobbens committed Feb 21, 2009
1 parent 7536fac commit 8bea68c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/joystick/linux/SDL_sysjoystick.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8bea68c

Please sign in to comment.