Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfbe2010 authored by Anssi Hannula's avatar Anssi Hannula Committed by Dmitry Torokhov
Browse files

Input: xpad - enable force feedback on xbox 360 controllers only



Commit 4994cd8d 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: default avatarAnssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent fc55e952
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);