Generic HID pads: rumble for Logitech RumblePad 2 / F510 / F710 (DirectInput mode) #4096

Open
github-bot wants to merge 1 commit from github-bot/gh-4096 into main AGit
Owner

@⁠uranuspluton on GitHub · 2026-11-30 16:00 UTC · original
uranuspluton:generic-pad-rumble → main · +230 −15 · 2 files · 1 commits · open

What it changes

Generic HID pads had no rumble (generic.rs: "These pads do not rumble"). Logitech's RumblePad 2 (046D:C218, also what the F510 reports in DirectInput mode) and Cordless RumblePad 2 (046D:C219, also the F710 in DirectInput mode) do have a known way to: a 7-byte output report, the one Linux's hid-lg2ff.c sends (0x51 with the light motor at byte 2 and the heavy one at byte 4; 0xF3 stops them).

  • generic.rs: rumble_report builds that report (Windows' write is 8 bytes, report id 0 first); rumbles lists the two pads. A pad with a known report gets a "generic pad rumble" writer thread with its own GENERIC_WRITE handle, so the reader's blocking read is not touched and a slow write holds up only that thread. The writer sends each change of the speeds once (compared as bytes, so a title setting the same speeds every frame writes nothing), stops the motors when the pad is found (they keep the last speeds sent, even from an earlier run), and ends when the pad goes away.
  • generic::rumble / generic::stop_rumble, wired where playstation already is: the slot routing in rumble and gameinput::stop_rumble at exit.
  • The connection line now says rumbles=true|false.
  • Every other generic pad is unchanged (no writer, no write).

How it was tested

  • Pad: Logitech RumblePad 2 USB (046D:C218), Windows 11, Windows' own HID driver, no Logitech software.
  • GPU and profile: RTX 4070 12 GB, Series S, 1440p output, DLSS Quality, frame generation x2 (the change does not touch rendering).
  • Before: the pad is read (buttons, sticks) but never rumbles.
  • After: cargo test -p victory-hle connected_generic_pads_rumble -- --ignored --nocapture runs the heavy motor, then the light one, then stops them.
  • In game: not tried yet with this exact build (the pad is read in game as before; I will report back on this pull request).
  • cargo test -p victory-hle gameinput passed (98 tests, two new ones on the report bytes; one ignored test that needs the pad, run by hand with the pad: ok).
  • cargo clippy -p victory-hle --all-targets: nothing in the files touched.
  • cargo xtask policy --staged passed.
  • Not tried: 046D:C219 (Cordless RumblePad 2 / F710), which takes the same report under Linux's driver.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #462 (DualShock 4 / Switch Pro over HID, no Logitech), #2866 #2894 (controls modes, not rumble). None adds rumble to generic pads.

🤖 Generated with Claude Code

**@⁠uranuspluton** on GitHub · 2026-11-30 16:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4096) `uranuspluton:generic-pad-rumble` → `main` · +230 −15 · 2 files · 1 commits · open ## What it changes Generic HID pads had no rumble (`generic.rs`: "These pads do not rumble"). Logitech's RumblePad 2 (046D:C218, also what the F510 reports in DirectInput mode) and Cordless RumblePad 2 (046D:C219, also the F710 in DirectInput mode) do have a known way to: a 7-byte output report, the one Linux's `hid-lg2ff.c` sends (0x51 with the light motor at byte 2 and the heavy one at byte 4; 0xF3 stops them). - `generic.rs`: `rumble_report` builds that report (Windows' write is 8 bytes, report id 0 first); `rumbles` lists the two pads. A pad with a known report gets a "generic pad rumble" writer thread with its own `GENERIC_WRITE` handle, so the reader's blocking read is not touched and a slow write holds up only that thread. The writer sends each change of the speeds once (compared as bytes, so a title setting the same speeds every frame writes nothing), stops the motors when the pad is found (they keep the last speeds sent, even from an earlier run), and ends when the pad goes away. - `generic::rumble` / `generic::stop_rumble`, wired where `playstation` already is: the slot routing in `rumble` and `gameinput::stop_rumble` at exit. - The connection line now says `rumbles=true|false`. - Every other generic pad is unchanged (no writer, no write). ## How it was tested - Pad: Logitech RumblePad 2 USB (046D:C218), Windows 11, Windows' own HID driver, no Logitech software. - GPU and profile: RTX 4070 12 GB, Series S, 1440p output, DLSS Quality, frame generation x2 (the change does not touch rendering). - Before: the pad is read (buttons, sticks) but never rumbles. - After: `cargo test -p victory-hle connected_generic_pads_rumble -- --ignored --nocapture` runs the heavy motor, then the light one, then stops them. - In game: not tried yet with this exact build (the pad is read in game as before; I will report back on this pull request). - `cargo test -p victory-hle gameinput` passed (98 tests, two new ones on the report bytes; one ignored test that needs the pad, run by hand with the pad: ok). - `cargo clippy -p victory-hle --all-targets`: nothing in the files touched. - `cargo xtask policy --staged` passed. - Not tried: 046D:C219 (Cordless RumblePad 2 / F710), which takes the same report under Linux's driver. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #462 (DualShock 4 / Switch Pro over HID, no Logitech), #2866 #2894 (controls modes, not rumble). None adds rumble to generic pads. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
046D:C218 and 046D:C219 take the 7-byte output report Linux's hid-lg2ff.c
sends (0x51, light motor at byte 2, heavy at byte 4; 0xF3 stops them).
Such a pad gets a writer thread with its own write handle that sends each
change of the title's speeds once, stops the motors when the pad is found
and at exit, and ends when the pad goes away. Other generic pads are
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 16:05:20 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4096/head:github-bot/gh-4096'
git switch 'github-bot/gh-4096'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4096'
git switch 'github-bot/gh-4096'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4096'
git switch 'github-bot/gh-4096'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4096'
git switch 'main'
git merge --squash 'github-bot/gh-4096'
git switch 'main'
git merge --ff-only 'github-bot/gh-4096'
git switch 'main'
git merge 'github-bot/gh-4096'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4096
No description provided.