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

Commit 5caceb06 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Jiri Kosina
Browse files

HID: sony: Set proper bit flags on DS4 output report



Only set bit flags for the portions of the DS4 output report
for which we have data.

Signed-off-by: default avatarRoderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 39254a13
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1998,13 +1998,13 @@ static void dualshock4_send_output_report(struct sony_sc *sc)
	if (sc->quirks & (DUALSHOCK4_CONTROLLER_USB | DUALSHOCK4_DONGLE)) {
		memset(buf, 0, DS4_OUTPUT_REPORT_0x05_SIZE);
		buf[0] = 0x05;
		buf[1] = 0xFF;
		buf[1] = 0x07; /* blink + LEDs + motor */
		offset = 4;
	} else {
		memset(buf, 0, DS4_OUTPUT_REPORT_0x11_SIZE);
		buf[0] = 0x11;
		buf[1] = 0xC0; /* HID + CRC */
		buf[3] = 0x0F;
		buf[3] = 0x07; /* blink + LEDs + motor */
		offset = 6;
	}