Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2866"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by steven-seagull27 on 2026-11-29T18:21:44Z.
Related: #2836, #2505, #2489, #2537
Summary
Ensures explicit controller-only modes (
VICTORY_CONTROLS=gamepadandVICTORY_CONTROLS=dualsense) completely isolate controller input from leftover mouse-and-keyboard settings (VICTORY_MNK=1/VICTORY_MNK_BINDINGS), while preservingAUTO-mode keyboard fallback (Enter-> A on the stand-in pad when no gamepad is connected):crates/victory-hle/src/modules/{gameinput,mnk,lifecycle}.rs,crates/victory-hle/src/mousehook.rs):mnk_allowed_for(controls)gatesmnk::enabled(),mnk::sample(),NATIVE_MOUSE_ON(native_mouse_enabled_for), andxinput_suppressed_for, so a leftoverVICTORY_MNK=1never hijacks the mouse cursor/camera hook or suppresses XInput gamepads inCONTROLS=gamepadmode (whileDUALSENSEcontinues to suppress XInput in favor of native DualSense HID).Host::keys()gates live keyboard polling (GetAsyncKeyState) onlive_keyboard_enabled_for(controls(), mnk_on())(!matches!(controls, Controls::Gamepad | Controls::DualSense)), suppressing live keyboard polling in explicitGAMEPAD/DUALSENSEmodes while keepingAUTO-mode keyboard fallback (Enter-> A on the fallback pad when no pad is connected) andKEYBOARDmode working.lifecycle::mouse_capture_enabled()checks!gameinput::pads_only()so legacy cursor capture never traps the pointer in controller-only or defaultAUTO(M&K off) modes.bindings.iniattachment (apps/victory/src/play.rs,scripts/play-foxhound.ps1):should_emit_mnk_bindingsinplay.rsand updatedscripts/play-foxhound.ps1so defaultVICTORY_MNK_BINDINGSis never attached whenVICTORY_CONTROLSisgamepadordualsense.(Note: Prompt-hook changes from an earlier revision of this PR were superseded by
3222c1ebonmainand dropped during the rebase ontocec481f4.)Verification
All checks run with
--lockedand synthetic unit tests only:cargo test --locked -j 2 -p victory-hle --lib -- gameinput --test-threads=1— 88 passed, 0 failed, 2 ignored (includes unit tests for controller-only M&K/native-mouse/XInput policy, live keyboard polling policy includingAUTOfallback, and pads-onlyState::polldevice isolation + fallback pad behavior).cargo test --locked -j 2 -p victory --bin victory -- --test-threads=1— 80 passed, 0 failed (includesshould_emit_mnk_bindingsunit test inplay.rs).cargo clippy --locked -j 2 -p victory-hle -p victory --bins --tests— 0 new warnings in touched files.git diff --check— clean.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by steven-seagull27 on 2026-11-29T20:12:15Z.
Rebased onto
cec481f4(cb11b17d):apps/victory/src/run.rsandREADME.mdprompt-hook hunks in favor of3222c1ebalready onmain.live_keyboard_enabled_forincrates/victory-hle/src/modules/gameinput.rsso live keyboard polling stays active inControls::Auto | Controls::Keyboard(preserving keyboard fallback such asEnter-> A on the stand-in pad in defaultAUTOmode when no pad is connected) and is suppressed only in explicit controller-only modes (Controls::Gamepad | Controls::DualSense).gameinput.rs,mnk.rs,lifecycle.rs,mousehook.rs,play.rs, andplay-foxhound.ps1.Re-verified with synthetic unit tests (
victory-hlegameinput: 88 passed / 0 failed / 2 ignored;victorybin: 80 passed / 0 failed),cargo clippy(0 new warnings in touched files), andgit diff --check.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by steven-seagull27 on 2026-11-30T18:40:16Z.
Rebased cleanly onto latest
main(e1251c31), updating the launcher guard toscripts/play-nvidia.ps1, extending the controller-onlymnkguard to coverbound_buttonsandprompt_keys, and harmonizing with#2583(XInputRoute) and#2734(InputRouting). Re-verifiedvictory-hlelib tests,victorybinary tests, Clippy, andxtask policy --staged.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.