GameInput: native mouse and keyboard no longer hide the XInput pad (#2436) #2583

Manually merged
github merged 1 commit from github-bot/gh-2583 into main 2026-11-30 14:14:40 +00:00 AGit
Owner

@⁠fainty0 on GitHub · 2026-11-29 14:39 UTC · original
fainty0:fix/2436-xinput-with-mnk → main · +65 −9 · 2 files · 1 commits · merged 2026-11-30 14:12 UTC

Fixes #2436

What it changes

The merge 1d5e66a8 (Merge branch 'wave-4' into combined) combined a per-slot probe that allowed XInput in native mouse mode with a snapshot guard that dropped all XInput slots whenever MNK bindings were loaded. The snapshot guard ran first, so the native-mode exception was unreachable.

With VICTORY_MNK=1, native mouse is on unless VICTORY_NATIVE_MOUSE=0. The fix lets physical XInput gameplay input work alongside mouse and keyboard, as the native-mode exception intended. By default, one-pad mode merges physical samples into the existing virtual gamepad; it does not enumerate a separate GameInput device. With VICTORY_ONE_PAD=0, the physical pad appears as its own GameInput device after the first nonzero input and remains visible until disconnected. Legacy MNK keeps XInput out of gameplay and uses it only for F1 menu navigation; DualSense-only selection still excludes XInput.

How it was tested

  • GPU and profile: not tested (no GPU, game, controller, or Windows runtime).
  • Before: inspected both release tags and the merge hunk; the older tag already excluded XInput with legacy MNK bindings. Ran both Windows-target Clippy baselines at 829188e9.
  • After: four hardware-free routing tests passed in a standalone Rust test harness. The default and multi-pad paths were traced in source. Both Windows-target workspace Clippy gates remain red on identical baseline diagnostics (default 5→5, all-features 4→4 with --keep-going). HLE-only default diagnostics were unchanged; all-features HLE linting was blocked by victory-gpu compilation errors on both revisions.
  • For shader changes, the wave sizes tested: not applicable.
  • cargo test passed for the crates it touches: no. The focused Linux Cargo invocation could not compile the Windows-dependent GPU crate. Windows tests were not run (no Windows).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2257 and #2459 touch prompt selection/helpers, not XInput polling. Also inspected #2548; no overlapping polling change found.
**@⁠fainty0** on GitHub · 2026-11-29 14:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2583) `fainty0:fix/2436-xinput-with-mnk` → `main` · +65 −9 · 2 files · 1 commits · merged 2026-11-30 14:12 UTC Fixes #2436 ## What it changes The merge `1d5e66a8` (Merge branch 'wave-4' into combined) combined a per-slot probe that allowed XInput in native mouse mode with a snapshot guard that dropped all XInput slots whenever MNK bindings were loaded. The snapshot guard ran first, so the native-mode exception was unreachable. With `VICTORY_MNK=1`, native mouse is on unless `VICTORY_NATIVE_MOUSE=0`. The fix lets physical XInput gameplay input work alongside mouse and keyboard, as the native-mode exception intended. By default, one-pad mode merges physical samples into the existing virtual gamepad; it does not enumerate a separate GameInput device. With `VICTORY_ONE_PAD=0`, the physical pad appears as its own GameInput device after the first nonzero input and remains visible until disconnected. Legacy MNK keeps XInput out of gameplay and uses it only for F1 menu navigation; DualSense-only selection still excludes XInput. ## How it was tested - GPU and profile: not tested (no GPU, game, controller, or Windows runtime). - Before: inspected both release tags and the merge hunk; the older tag already excluded XInput with legacy MNK bindings. Ran both Windows-target Clippy baselines at `829188e9`. - After: four hardware-free routing tests passed in a standalone Rust test harness. The default and multi-pad paths were traced in source. Both Windows-target workspace Clippy gates remain red on identical baseline diagnostics (default 5→5, all-features 4→4 with `--keep-going`). HLE-only default diagnostics were unchanged; all-features HLE linting was blocked by `victory-gpu` compilation errors on both revisions. - For shader changes, the wave sizes tested: not applicable. - `cargo test` passed for the crates it touches: no. The focused Linux Cargo invocation could not compile the Windows-dependent GPU crate. Windows tests were not run (no Windows). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2257 and #2459 touch prompt selection/helpers, not XInput polling. Also inspected #2548; no overlapping polling change found.
The wave-4 merge kept the menu-only XInput snapshot guard from the legacy sampler, masking the native mouse path's XInput support. Route only legacy MNK to menu-only XInput, and keep the controller and keyboard inputs together in native mode.

Fixes #2436

Co-authored-by: Andrei Turcan <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 14:44:52 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-30 06:47 UTC · original

I checked #2436 on Windows with Rust 1.98.1/MSVC. The current release v2026.11.29.05 and main both point to 41adb551. The exact #2583 commit d346bcd applied cleanly there as 7505a52, preserving its Git author.

I ran the same native Host::pad test in both trees. The test substitutes the return value of one connected XInput pad with button A pressed and its right stick half-right. It exercises the normal gameplay-slot routing and uses one temporary bindings file.

Input configuration Release/main 41adb551 With #2583 7505a52
Native mouse and keyboard, bindings loaded Gameplay slot empty Button A and right-stick sample delivered
Legacy mouse and keyboard, F1 pad navigation disabled Gameplay slot empty Gameplay slot empty
Mouse and keyboard off Sample delivered Sample delivered

The Windows GameInput suite passed 84 tests on main and 88 with the patch, including all four new routing tests. Two tests were ignored on each tree. These checks use a synthetic XInput sample.

@⁠ZorionTen, could you try the same wired controller with native mouse and keyboard enabled on the current release and on a build containing #2583? Please check whether a button and the right stick work while mouse look still works. If a test build is needed, could the maintainer provide one from current main plus #2583? Original report

The PR currently shows the title-label check. A Windows CI run on the rebased head would also help review.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-30 06:47 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2583#issuecomment-7271008572) I checked #2436 on Windows with Rust 1.98.1/MSVC. The current release `v2026.11.29.05` and `main` both point to `41adb551`. The exact #2583 commit `d346bcd` applied cleanly there as `7505a52`, preserving its Git author. I ran the same native `Host::pad` test in both trees. The test substitutes the return value of one connected XInput pad with button A pressed and its right stick half-right. It exercises the normal gameplay-slot routing and uses one temporary bindings file. | Input configuration | Release/main `41adb551` | With #2583 `7505a52` | | --- | --- | --- | | Native mouse and keyboard, bindings loaded | Gameplay slot empty | Button A and right-stick sample delivered | | Legacy mouse and keyboard, F1 pad navigation disabled | Gameplay slot empty | Gameplay slot empty | | Mouse and keyboard off | Sample delivered | Sample delivered | The Windows GameInput suite passed 84 tests on main and 88 with the patch, including all four new routing tests. Two tests were ignored on each tree. These checks use a synthetic XInput sample. @⁠ZorionTen, could you try the same wired controller with native mouse and keyboard enabled on the current release and on a build containing #2583? Please check whether a button and the right stick work while mouse look still works. If a test build is needed, could the maintainer provide one from current main plus #2583? [Original report](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/issues/2436) The PR currently shows the title-label check. A Windows CI run on the rebased head would also help review. AI-assisted with OpenAI Codex.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-30 08:22 UTC · original

ZorionTen has now confirmed the symptom and fix in gameplay. Their fork's faa66194 removes the unconditional MNK exclusion, and they report that controller input, mouse, and keyboard all work together.

That independently corroborates the routing diagnosis for #2583. The gameplay run used their fork's commit. The Windows synthetic routing results above cover the exact #2583 patch applied to current main, including legacy-MNK and DualSense-only controls.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-30 08:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2583#issuecomment-7272821284) ZorionTen has now [confirmed the symptom and fix in gameplay](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/issues/2436). Their fork's `faa66194` removes the unconditional MNK exclusion, and they report that controller input, mouse, and keyboard all work together. That independently corroborates the routing diagnosis for #2583. The gameplay run used their fork's commit. The [Windows synthetic routing results above](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/2583) cover the exact #2583 patch applied to current main, including legacy-MNK and DualSense-only controls.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-30 12:00 UTC · original

An independent report now confirms the control on an Xbox Elite Series 2. In #3709, the failing build logged VICTORY_MNK=1, the keyboard stand-in and no physical XInput slot. The reporter then launched with VICTORY_MNK=0 and confirmed the controller worked. Reporter confirmation

This matches the control arm of the Windows fixture above. The fixture also shows the connected pad sample is delivered with native MNK enabled on this PR. An on-device run of the exact PR head with MNK still enabled would complete that part of the check.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-30 12:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2583#issuecomment-7277820909) An independent report now confirms the control on an Xbox Elite Series 2. In #3709, the failing build logged `VICTORY_MNK=1`, the keyboard stand-in and no physical XInput slot. The reporter then launched with `VICTORY_MNK=0` and confirmed the controller worked. [Reporter confirmation](https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/issues/3709) This matches the control arm of the Windows fixture above. The fixture also shows the connected pad sample is delivered with native MNK enabled on this PR. An on-device run of the exact PR head with MNK still enabled would complete that part of the check. AI-assisted with OpenAI Codex.
github manually merged commit 6b06188320 into main 2026-11-30 14:14:40 +00:00
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!2583
No description provided.