File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -2143,6 +2143,26 @@ static void dualshock4_output_worker(struct work_struct *work)
2143
2143
2144
2144
spin_lock_irqsave (& ds4 -> base .lock , flags );
2145
2145
2146
+ /*
2147
+ * Some 3rd party gamepads expect updates to rumble and lightbar
2148
+ * together, and setting one may cancel the other.
2149
+ *
2150
+ * Let's maximise compatibility by always sending rumble and lightbar
2151
+ * updates together, even when only one has been scheduled, resulting
2152
+ * in:
2153
+ *
2154
+ * ds4->valid_flag0 >= 0x03
2155
+ *
2156
+ * Hopefully this will maximise compatibility with third-party pads.
2157
+ *
2158
+ * Any further update bits, such as 0x04 for lightbar blinking, will
2159
+ * be or'd on top of this like before.
2160
+ */
2161
+ if (ds4 -> update_rumble || ds4 -> update_lightbar ) {
2162
+ ds4 -> update_rumble = true; /* 0x01 */
2163
+ ds4 -> update_lightbar = true; /* 0x02 */
2164
+ }
2165
+
2146
2166
if (ds4 -> update_rumble ) {
2147
2167
/* Select classic rumble style haptics and enable it. */
2148
2168
common -> valid_flag0 |= DS4_OUTPUT_VALID_FLAG0_MOTOR ;
You can’t perform that action at this time.
0 commit comments