Skip to content

Commit

Permalink
Input: xpad - enable force feedback on xbox 360 controllers only
Browse files Browse the repository at this point in the history
Commit 4994cd8 introduced a
regression which causes xpad to report force feedback cababilities
for non-360 controllers too, even while there is no actual support
for those.

Fix that by adding a check for XTYPE_XBOX360 to xpad_init_ff().

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Anssi Hannula authored and Dmitry Torokhov committed Apr 3, 2008
1 parent fc55e95 commit cfbe201
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/input/joystick/xpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,9 @@ static int xpad_play_effect(struct input_dev *dev, void *data,

static int xpad_init_ff(struct usb_xpad *xpad)
{
if (xpad->xtype != XTYPE_XBOX360)
return 0;

input_set_capability(xpad->dev, EV_FF, FF_RUMBLE);

return input_ff_create_memless(xpad->dev, NULL, xpad_play_effect);
Expand Down

0 comments on commit cfbe201

Please sign in to comment.