HID: hid-steam: Add gamepad-only mode switched to by holding options
authorVicki Pfau <vi@endrift.com>
Wed, 20 Dec 2023 03:38:37 +0000 (19:38 -0800)
committerJiri Kosina <jkosina@suse.com>
Tue, 2 Jan 2024 10:20:43 +0000 (11:20 +0100)
commitcd438e57dd05b077f4e87c1567beafb2377b6d6b
treef8335d22fa10bbba58e78a8d0329a68386aadcd1
parent43565b6788d46820da7d8f5ab1a595398419e914
HID: hid-steam: Add gamepad-only mode switched to by holding options

This commit adds a hotkey to switch between "gamepad" mode (mouse and keyboard
disabled) and "desktop" mode (gamepad disabled) by holding down the options
button (mapped here as the start button). This mirrors the behavior of the
official Steam client.

This also adds and uses a function for generating haptic pulses, as Steam also
does when engaging this hotkey.

Signed-off-by: Vicki Pfau <vi@endrift.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-steam.c