Input: trigger rumble via XInputSetStateEx ordinal 100 #1104

Closed
ashrafsdrop wants to merge 1 commit from upstream-pr/1104 into main
ashrafsdrop commented 2026-11-24 15:47:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ashrafsdrop on 2026-11-24T15:47:14Z.


Summary

Implements impulse trigger rumble for Xbox controllers on Windows hosts in victory-hle::gameinput.

  • Extends Source::rumble to accept left_trigger and right_trigger levels.
  • Queries XInputSetStateEx (ordinal 100 in xinput1_4.dll) dynamically to drive low/high motors alongside left/right impulse triggers.
  • Falls back to standard XInputSetState (low/high only) on systems where ordinal 100 is unavailable.
  • Reports rumble_motors = 0xF (Low | High | LeftTrigger | RightTrigger) in DeviceInfo for connected gamepads.
  • Updates unit tests in crates/victory-hle/src/modules/gameinput.rs and removes the outstanding trigger rumble item from README.md.

Verification

  • cargo test -p victory-hle: all 94 unit tests passing (including four-channel rumble verification).
  • cargo run -p xtask -- policy: asset policy passes (154 files ok).
<!-- greyfinch-sync:Marvisak/VIctory:issue:6585710237 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1104). Originally posted by [ashrafsdrop](https://github.com/ashrafsdrop) on 2026-11-24T15:47:14Z. --- ### Summary Implements impulse trigger rumble for Xbox controllers on Windows hosts in `victory-hle::gameinput`. - Extends `Source::rumble` to accept `left_trigger` and `right_trigger` levels. - Queries `XInputSetStateEx` (ordinal 100 in `xinput1_4.dll`) dynamically to drive low/high motors alongside left/right impulse triggers. - Falls back to standard `XInputSetState` (low/high only) on systems where ordinal 100 is unavailable. - Reports `rumble_motors = 0xF` (`Low | High | LeftTrigger | RightTrigger`) in `DeviceInfo` for connected gamepads. - Updates unit tests in `crates/victory-hle/src/modules/gameinput.rs` and removes the outstanding trigger rumble item from `README.md`. ### Verification - `cargo test -p victory-hle`: all 94 unit tests passing (including four-channel rumble verification). - `cargo run -p xtask -- policy`: asset policy passes (154 files ok).
Zipettte commented 2026-11-24 18:06:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:54Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at da8875b: cargo test -p victory-hle passes, 95 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140056787 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1104#issuecomment-7140056787). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:01:54Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at da8875b: `cargo test -p victory-hle` passes, 95 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
upstream-sync closed this pull request 2026-11-24 23:04:25 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1104
No description provided.