GameInput: IsForceFeedbackMotorPoweredOn stays false, and says why (#4559) #4662

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

@⁠RochDawid on GitHub · 2026-12-01 00:53 UTC · original
RochDawid:gameinput-ffb-motors → main · +22 −0 · 1 files · 1 commits · open

Refs #4560

What it changes

IsForceFeedbackMotorPoweredOn (device slot 0x38) keeps answering false. This pull request does not change that. It documents why false is correct and adds a test that pins the behaviour.

Why not true:

  • Force-feedback motors are not rumble motors. In GameInput, force-feedback motors belong to wheels and flight sticks and are counted by forceFeedbackMotorCount in the device info. A pad's body motors are supportedRumbleMotors (we report 0x3, low and high frequency) and are driven through SetRumbleState (slot 0x50), which never consults this query.
  • Every device of ours reports forceFeedbackMotorCount = 0. Answering true for any index would claim a motor the device info says does not exist.
  • The reporter's own measurement agrees (see #4560): across 14 instrumented runs the title calls only slot 0x18 (device info), never 0x30/0x38/0x48, and changing the return to motor < 2 made no difference to rumble.

Changes:

  • Doc comment on motor_powered_on explaining the force-feedback vs rumble distinction, with a reference to #4560, so this does not get "fixed" again.
  • Test raw::rumble_without_force_feedback: every count past rumble_motors (including forceFeedbackMotorCount) is 0 for every device, no motor index reports powered on, and pad 0 still offers both rumble motors.

It changes no behaviour, so Refs rather than Fixes: if the maintainer agrees false is right, #4560 can be closed as not a bug.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): not tested in a game. It changes no runtime behaviour.
  • Before: n/a
  • After: n/a
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): n/a, not a shader change
  • cargo test passed for the crates it touches: yes. cargo test -p victory-hle --lib gameinput: 97 passed (Windows toolchain), commit 233cb022.
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean.
  • Asset policy (pre-commit hook): 1 file ok.
  • CI: the CI workflow has not run on this commit yet (it is waiting for approval to run), so it has not passed.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2835 (open, also changes crates/victory-hle/src/modules/gameinput.rs, for rumble on generic pads; it does not touch motor_powered_on).
**@⁠RochDawid** on GitHub · 2026-12-01 00:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4661) `RochDawid:gameinput-ffb-motors` → `main` · +22 −0 · 1 files · 1 commits · open Refs #4560 ## What it changes `IsForceFeedbackMotorPoweredOn` (device slot 0x38) keeps answering `false`. This pull request does not change that. It documents why `false` is correct and adds a test that pins the behaviour. Why not `true`: - **Force-feedback motors are not rumble motors.** In GameInput, force-feedback motors belong to wheels and flight sticks and are counted by `forceFeedbackMotorCount` in the device info. A pad's body motors are `supportedRumbleMotors` (we report `0x3`, low and high frequency) and are driven through `SetRumbleState` (slot 0x50), which never consults this query. - **Every device of ours reports `forceFeedbackMotorCount = 0`.** Answering `true` for any index would claim a motor the device info says does not exist. - **The reporter's own measurement agrees** (see #4560): across 14 instrumented runs the title calls only slot 0x18 (device info), never 0x30/0x38/0x48, and changing the return to `motor < 2` made no difference to rumble. Changes: - Doc comment on `motor_powered_on` explaining the force-feedback vs rumble distinction, with a reference to #4560, so this does not get "fixed" again. - Test `raw::rumble_without_force_feedback`: every count past `rumble_motors` (including `forceFeedbackMotorCount`) is 0 for every device, no motor index reports powered on, and pad 0 still offers both rumble motors. It changes no behaviour, so `Refs` rather than `Fixes`: if the maintainer agrees `false` is right, #4560 can be closed as not a bug. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): not tested in a game. It changes no runtime behaviour. - Before: n/a - After: n/a - For shader changes, the wave sizes tested (32 and/or 64 lanes): n/a, not a shader change - `cargo test` passed for the crates it touches: yes. `cargo test -p victory-hle --lib gameinput`: 97 passed (Windows toolchain), commit 233cb022. - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings`: clean. - Asset policy (pre-commit hook): 1 file ok. - CI: the `CI` workflow has not run on this commit yet (it is waiting for approval to run), so it has not passed. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2835 (open, also changes `crates/victory-hle/src/modules/gameinput.rs`, for rumble on generic pads; it does not touch `motor_powered_on`).
Force-feedback motors are a wheel's or flight stick's, counted by
forceFeedbackMotorCount, which is 0 for every device of ours; a pad's body
motors are supportedRumbleMotors and go through SetRumbleState. Answering
true would claim motors the device info says do not exist, and the reporter
measured it changes nothing (the title only calls slot 0x18). A test pins
the invariant: rumble motors on the pads, no force-feedback motor anywhere.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 00:57:58 +00:00
Author
Owner

@⁠gbmrrr on GitHub · 2026-12-01 02:27 UTC · original

Confirmed, and thank you — you are right and my issue was wrong about the cause. I have reverted my local motor < 2 and taken your reasoning into the doc comment here, crediting #4662.

The distinction you make is the one I missed: force-feedback motors are not rumble motors. I read IsForceFeedbackMotorPoweredOn as "is this motor able to buzz", which it is not — supportedRumbleMotors is that question, and it is a different field from forceFeedbackMotorCount. Since every device of ours reports the count as 0, answering true for any index made the two halves of our own DeviceInfo contradict each other. Worse, the half that actually drives what a player feels is SetRumbleState (slot 0x50), which never consults this query at all.

Two things from my side that support keeping false:

18 instrumented runs, VICTORY_PAD_LOG=1:
  the title called device info slot=0x18    18x
  any other device slot                      0x
  "input device method not implemented"      0x

So nothing in this title depends on it either way, which is exactly why the false that describes the hardware honestly should stay rather than the true that made a local symptom look better.

One small thing I did on my own tree that may be worth having here, if you want it: 0x48 (haptics) used to answer E_NOTIMPL from our generic "not written yet" handler, which reads as our gap rather than the device has none. I changed that slot to answer E_NOINTERFACE — the console's answer for an interface the device does not implement — while 0x30 (force feedback) keeps E_NOTIMPL, since that is the interface we genuinely have not written. It changes nothing for this title (slot 0x18 only, as above) and it is outside what you are changing, so it is a suggestion rather than a request to fold into this PR.

Your test pins the behaviour, which is what my issue should have produced instead of a bad one-line fix. Merge as far as I am concerned.

**@⁠gbmrrr** on GitHub · 2026-12-01 02:27 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4661#issuecomment-7298635350) Confirmed, and thank you — you are right and my issue was wrong about the cause. I have reverted my local `motor < 2` and taken your reasoning into the doc comment here, crediting #4662. The distinction you make is the one I missed: **force-feedback motors are not rumble motors.** I read `IsForceFeedbackMotorPoweredOn` as "is this motor able to buzz", which it is not — `supportedRumbleMotors` is that question, and it is a different field from `forceFeedbackMotorCount`. Since every device of ours reports the count as 0, answering `true` for any index made the two halves of our own `DeviceInfo` contradict each other. Worse, the half that actually drives what a player feels is `SetRumbleState` (slot `0x50`), which never consults this query at all. Two things from my side that support keeping `false`: ``` 18 instrumented runs, VICTORY_PAD_LOG=1: the title called device info slot=0x18 18x any other device slot 0x "input device method not implemented" 0x ``` So nothing in this title depends on it either way, which is exactly why the `false` that describes the hardware honestly should stay rather than the `true` that made a local symptom look better. One small thing I did on my own tree that may be worth having here, if you want it: `0x48` (haptics) used to answer `E_NOTIMPL` from our generic "not written yet" handler, which reads as *our gap* rather than *the device has none*. I changed that slot to answer `E_NOINTERFACE` — the console's answer for an interface the device does not implement — while `0x30` (force feedback) keeps `E_NOTIMPL`, since that is the interface we genuinely have not written. It changes nothing for this title (slot `0x18` only, as above) and it is outside what you are changing, so it is a suggestion rather than a request to fold into this PR. Your test pins the behaviour, which is what my issue should have produced instead of a bad one-line fix. Merge as far as I am concerned.
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/4662/head:github-bot/gh-4661'
git switch 'github-bot/gh-4661'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4661'
git switch 'github-bot/gh-4661'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4661'
git switch 'github-bot/gh-4661'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4661'
git switch 'main'
git merge --squash 'github-bot/gh-4661'
git switch 'main'
git merge --ff-only 'github-bot/gh-4661'
git switch 'main'
git merge 'github-bot/gh-4661'
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!4662
No description provided.