Input: allow mouse and keyboard to feed stand-in pad under CONTROLS=gamepad (#2844) #2894

Closed
github-bot wants to merge 1 commit from github-bot/gh-2894 into main AGit
Owner

@⁠dheerajc8073 on GitHub · 2026-11-29 18:35 UTC · original
dheerajc8073:fix/controls-gamepad-mnk-input → main · +8 −5 · 2 files · 1 commits · closed without merging

Summary

Fixes #2844.

When \CONTROLS=gamepad\ (or \dualsense) was selected with \VICTORY_MNK=1\ enabled:

  1. \Host::keys()\ previously returned an empty \Vec::new(), completely starving \ allback_for_seat(&keys, overlay.seat)\ of physical keystrokes. As a result, pressing Enter, Shift, Space, or WASD delivered zero button presses to the stand-in pad.
  2. In \State::poll(), \mouse\ was filtered out via \mouse.filter(|_| !pads_only)\ before being passed to \self.look.pad(mouse, &LOOK). This stripped mouse delta and buttons from mouse-look stick emulation and trigger mappings.

Fix

  • In \State::poll(), compute \look\ from the unfiltered \mouse\ state so translated sticks/triggers are generated for the stand-in gamepad, while retaining \device_mouse = mouse.filter(|_| !pads_only)\ for the title's GameInput \MOUSE\ device (so controller prompts remain active).
  • In \Host::keys(), verify !mnk\ (\super::mnk::enabled() || super::mnk_on()) before short-circuiting on \Controls::Gamepad\ or \Controls::DualSense, ensuring physical keys continue feeding the stand-in pad.
  • Allow \mouse_capture_enabled()\ in \lifecycle.rs\ to honor \VICTORY_MOUSE_CAPTURE\ when \mnk_on()\ is active under Gamepad controls.
**@⁠dheerajc8073** on GitHub · 2026-11-29 18:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2894) `dheerajc8073:fix/controls-gamepad-mnk-input` → `main` · +8 −5 · 2 files · 1 commits · closed without merging ## Summary Fixes #2844. When \CONTROLS=gamepad\ (or \dualsense\) was selected with \VICTORY_MNK=1\ enabled: 1. \Host::keys()\ previously returned an empty \Vec::new()\, completely starving \ allback_for_seat(&keys, overlay.seat)\ of physical keystrokes. As a result, pressing Enter, Shift, Space, or WASD delivered zero button presses to the stand-in pad. 2. In \State::poll()\, \mouse\ was filtered out via \mouse.filter(|_| !pads_only)\ *before* being passed to \self.look.pad(mouse, &LOOK)\. This stripped mouse delta and buttons from mouse-look stick emulation and trigger mappings. ## Fix - In \State::poll()\, compute \look\ from the unfiltered \mouse\ state so translated sticks/triggers are generated for the stand-in gamepad, while retaining \device_mouse = mouse.filter(|_| !pads_only)\ for the title's GameInput \MOUSE\ device (so controller prompts remain active). - In \Host::keys()\, verify \!mnk\ (\super::mnk::enabled() || super::mnk_on()\) before short-circuiting on \Controls::Gamepad\ or \Controls::DualSense\, ensuring physical keys continue feeding the stand-in pad. - Allow \mouse_capture_enabled()\ in \lifecycle.rs\ to honor \VICTORY_MOUSE_CAPTURE\ when \mnk_on()\ is active under Gamepad controls.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 18:40:22 +00:00
github-bot force-pushed github-bot/gh-2894 from 5611419280 to c6b6b1e1e2 2026-11-30 14:53:54 +00:00 Compare
github-bot force-pushed github-bot/gh-2894 from c6b6b1e1e2 to acbb8ec560 2026-12-01 05:34:53 +00:00 Compare
Author
Owner

@⁠dheerajc8073 on GitHub · 2026-12-01 05:40 UTC · original

Rebased onto latest \main\ (\5fabb46e). Note that the failing \cargo clippy\ warnings (\ ictory-gpu/src/host/font.rs\ and \ ictory-gpu/src/host/panel.rs) are pre-existing on \main; the \ ictory-hle\ changes in this PR have no clippy warnings or build errors.

**@⁠dheerajc8073** on GitHub · 2026-12-01 05:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2894#issuecomment-7302025086) Rebased onto latest \main\ (\5fabb46e\). Note that the failing \cargo clippy\ warnings (\ ictory-gpu/src/host/font.rs\ and \ ictory-gpu/src/host/panel.rs\) are pre-existing on \main\; the \ ictory-hle\ changes in this PR have no clippy warnings or build errors.
github-bot closed this pull request 2026-12-01 08:10:08 +00:00
Author
Owner

@⁠dheerajc8073 on GitHub · 2026-12-01 08:05 UTC · original

Closing this PR: CONTROLS=gamepad / Controls::DualSense are intentionally controller-only on main (pads_only_for), passing mnk_on() as mnk_bindings to XInputRoute::for_poll breaks native-mouse/XInput routing, and AUTO + M&K/pad routing is already covered by #2583, #2734, and #2866.

**@⁠dheerajc8073** on GitHub · 2026-12-01 08:05 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2894#issuecomment-7304851424) Closing this PR: CONTROLS=gamepad / Controls::DualSense are intentionally controller-only on main (pads_only_for), passing mnk_on() as mnk_bindings to XInputRoute::for_poll breaks native-mouse/XInput routing, and AUTO + M&K/pad routing is already covered by #2583, #2734, and #2866.

Pull request closed

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!2894
No description provided.