HID: steam: remove input device when a hid client is running.
authorRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Sun, 14 Oct 2018 17:36:43 +0000 (19:36 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 19 Nov 2018 15:19:51 +0000 (16:19 +0100)
commit385a4886778f6d6e61eff1d4d295af332d7130e1
treeb40c421673eda77924a6db338cf53197ab02bb92
parent4d26d1d1e8065bb3326a7c06d5d4698e581443a9
HID: steam: remove input device when a hid client is running.

Previously, when a HID client such as the Steam Client was running, this
driver disabled its input device to avoid doubling the input events.

While it worked mostly fine, some games got confused by the idle gamepad,
and switched to two player mode, or asked the user to choose which gamepad
to use. Other games just crashed, probably a bug in Unity [1].

With this commit, when a HID client starts, the input device is removed;
when the HID client ends the input device is recreated.

[1]: https://github.com/ValveSoftware/steam-for-linux/issues/5645

Signed-off-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-steam.c