Commit 596fbf9
committed
Add player LED gamepad feedback handling
Introduces a new `set_player_leds` gamepad feedback message and wires it through virtualhid and control-stream encoding. Player LED output is converted to solid/flashing bitmasks, deduplicated like other feedback signals, reset on reconnect, and sent with a new Sunshine extension packet type (`0x5504`). Unit tests were expanded to verify routing and deduplication behavior for player LED updates, and the libvirtualhid submodule was bumped to a version that provides player LED output events.1 parent e3c8713 commit 596fbf9
5 files changed
Lines changed: 102 additions & 1 deletion
File tree
- src
- platform
- tests/unit/platform
- third-party
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
192 | 209 | | |
193 | 210 | | |
194 | 211 | | |
| |||
233 | 250 | | |
234 | 251 | | |
235 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
236 | 258 | | |
237 | 259 | | |
238 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
319 | 338 | | |
320 | 339 | | |
321 | 340 | | |
| |||
390 | 409 | | |
391 | 410 | | |
392 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
393 | 425 | | |
394 | 426 | | |
395 | 427 | | |
| |||
595 | 627 | | |
596 | 628 | | |
597 | 629 | | |
| 630 | + | |
598 | 631 | | |
599 | 632 | | |
600 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
242 | 255 | | |
243 | 256 | | |
244 | 257 | | |
| |||
1034 | 1047 | | |
1035 | 1048 | | |
1036 | 1049 | | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1037 | 1066 | | |
1038 | 1067 | | |
1039 | 1068 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
409 | 426 | | |
410 | 427 | | |
411 | 428 | | |
| |||
Submodule libvirtualhid updated 28 files
- .github/workflows/ci-build.yml+1-2
- README.md+5-5
- docs/end-user-gamepad-guide.md+25-19
- docs/platform-support.md+20-14
- docs/streaming-host-integration.md+7-4
- docs/usage.md+7-6
- docs/windows-driver.md+5-1
- src/core/gamepad_adapter.cpp+3
- src/core/profiles.cpp+7-1
- src/core/report.cpp+88-7
- src/include/libvirtualhid/gamepad_adapter.hpp+5
- src/include/libvirtualhid/types.hpp+16
- src/platform/linux/uhid_backend.cpp+18-2
- src/platform/windows/driver/libvirtualhid_umdf.cpp+2-2
- src/shared/switch_pro_protocol.hpp+4-4
- tests/fixtures/include/fixtures/linux_backend_test_hooks.hpp+88-36
- tests/fixtures/linux_backend_test_hooks.cpp+82-14
- tests/unit/test_freebsd_backend.cpp+2
- tests/unit/test_gamepad_adapter.cpp+5
- tests/unit/test_linux_backend.cpp+57-71
- tests/unit/test_linux_consumers.cpp+65-4
- tests/unit/test_profiles.cpp+1
- tests/unit/test_report.cpp+183
- tests/unit/test_virtualhid_control_model.cpp+16-6
- tests/unit/test_windows_consumers.cpp+114
- tests/unit/test_windows_driver_protocol.cpp+12-12
- tools/virtualhid_control_model.cpp+20-1
- tools/virtualhid_control_model.hpp+1
0 commit comments