GameInput: Sony pad rumble through a write handle of its own #390

Closed
github-bot wants to merge 0 commits from github-bot/gh-390 into main AGit
Owner

@⁠hatefulpineapple on GitHub · 2026-12-01 21:40 UTC · original
hatefulpineapple:pr/sony-rumble-write → main · +84 −19 · 1 files · 72 commits · closed without merging

Rumble on DualShock 4 / DualSense / DualSense Edge went through
HidD_SetOutputReport on the same handle the reader thread holds in a
blocking ReadFile. Windows sizes an output write for the collection's
longest report, so a report of the controller's own length can be refused
when the collection asks for more.

This opens a second handle for writing, asks the preparsed data for
OutputReportByteLength, and pads the report with zeros past the
controller's own bytes — the Bluetooth CRC stays at the end of the
controller's report. One WriteFile sends one report; a short write is an
error, not a report to resume. The Bluetooth initialization output takes
the same path, and the sequence number advances per send.

Report layouts and the CRC are unchanged; no new switches.
Verified: the pure report logic 14/14 on macOS (standalone harness, including a new test
that the padding keeps the CRC at the end of the controller's report),
cross-target clippy clean for victory-hle in both CI passes. The same
change has been running in local Windows x64 release packages built from
upstream main plus this overlay, where the victory-hle suite passed
196 tests.

**@⁠hatefulpineapple** on GitHub · 2026-12-01 21:40 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/390) `hatefulpineapple:pr/sony-rumble-write` → `main` · +84 −19 · 1 files · 72 commits · closed without merging Rumble on DualShock 4 / DualSense / DualSense Edge went through `HidD_SetOutputReport` on the same handle the reader thread holds in a blocking `ReadFile`. Windows sizes an output write for the collection's longest report, so a report of the controller's own length can be refused when the collection asks for more. This opens a second handle for writing, asks the preparsed data for `OutputReportByteLength`, and pads the report with zeros past the controller's own bytes — the Bluetooth CRC stays at the end of the controller's report. One `WriteFile` sends one report; a short write is an error, not a report to resume. The Bluetooth initialization output takes the same path, and the sequence number advances per send. Report layouts and the CRC are unchanged; no new switches. Verified: the pure report logic 14/14 on macOS (standalone harness, including a new test that the padding keeps the CRC at the end of the controller's report), cross-target clippy clean for `victory-hle` in both CI passes. The same change has been running in local Windows x64 release packages built from upstream main plus this overlay, where the `victory-hle` suite passed 196 tests.
HidD_SetOutputReport went through the input handle the reader thread
holds in a blocking ReadFile, and Windows sizes an output write for the
collection's longest report: a report of the controller's own length is
refused when the collection asks for more.

Open a second handle for writing, ask the preparsed data for
OutputReportByteLength, and pad the report with zeros past the
controller's own bytes (the Bluetooth CRC stays at the end of the
controller's report). One WriteFile sends one report; a short write is
an error, not a report to resume. The Bluetooth initialization output
takes the same path, and the sequence number advances per send.

The report layouts and the CRC are unchanged; a new test holds the
padding to the controller's report and its CRC.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 21:44:53 +00:00
github-bot closed this pull request 2026-12-02 07:54:23 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.