Repository navigation
Conversation
The title sends four motor levels to slot 0x50 (low and high frequency, left and right trigger); XInput has no trigger motors, so the last two were dropped. The `windows` crate is already a dependency, so its `Gaming_Input` feature gives the WinRT `Gamepad.Vibration` outside diagnostics builds. When one XInput slot is connected and Windows.Gaming.Input lists one pad, all four motors go to that pad; otherwise the body motors go through XInput as before. The two APIs share no pad identity, so with several pads the triggers stay still (a shortcut, noted). A pad that stops being driven this way has its vibration cleared first. Windows.Gaming.Input ignores the process while none of its windows is in front, so in the background the body motors stop too. Levels are clamped to 0..1 with NaN as off, and `Source::rumble` takes all four as `Motors`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):
cargo test -p victory-hle --lib gameinput::— 9 passed, 0 failedcargo clippy -p victory-hle --all-targets— 0 warningscargo xtask policy— ok (183 files ok)
Clean trigger rumble support via Windows.Gaming.Input with fallback to XInput and updated README.md. Looks good.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.
Rumble via Windows.Gaming.Input instead of XInput — newer input path; note the crate is still Windows-only so this stays static on macOS.
|
Automated triage for the maintainers.
Worth a maintainer's look: the disclosed trade-off that Windows.Gaming.Input stops all rumble while the window is in the background, which XInput did not. Generated by Claude Code |
|
Code review and Windows 11 verification at head
LGTM. |
|
Comparison of the four open trigger-rumble PRs (README: "Trigger rumble"), each merged onto current main 63bcca4. Windows 11, toolchain 1.98.1; no pad here, so unit tests and CI's clippy checks only.
#1958 and #2095 are separate implementations of the same Windows.Gaming.Input trigger path. #1958 also carries three input changes besides rumble (device methods answering as devices, a manual-dispatch dispatcher, QueryInterface by interface id) and tests for them; #2095 is rumble only, smaller, without tests. Taking one should close the other three. Both add AI-assisted (Claude). |
The title sends four motor levels to the device's rumble slot (0x50); the last two, the trigger motors, were dropped because XInput has none. This drives all four through Windows.Gaming.Input (the windows crate's Gaming_Input feature) when exactly one pad is connected, and falls back to XInput otherwise, since the two APIs share no pad identity. A pad that stops being driven this way has its vibration cleared.
Windows.Gaming.Input ignores the process while none of its windows is in front, so in the background the body motors stop too (XInput used to keep them going).
Tested on Windows 11 with an Xbox One pad over USB: all four motors respond with our window in front. I checked this with a hand-run test I've left out of this PR and can add if you want it.