F1 menu: MOUSE LOOK SENSITIVITY, applied without a restart #1149

Closed
Alxspb wants to merge 3 commits from upstream-pr/1149 into main
Alxspb commented 2026-11-28 14:17:02 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Alxspb on 2026-11-28T14:17:02Z.


What

One new row in the F1 settings menu — MOUSE LOOK SENSITIVITY — that changes the keyboard-and-mouse look's multiplier at once, without restarting the game.

Stacked on #989. GitHub cannot take another fork's branch as the base, so this PR is against main and its diff carries #989's two commits as well. Only the last commit (de4b21b) is new here; after #989 lands, this becomes a one-commit diff.

Why it matters

VICTORY_MOUSE_SENS (from #989) is read once into a LazyLock, at the first poll (gameinput.rs:1487). Matching that number to the title's own look slider therefore means: close the game, edit the environment, start again, sit through the one-time shader recompile — minutes per attempt, at something a player judges in seconds while moving the mouse.

The multiplier scales deflection per pixel in stick space: BASE_SENS (0.022) times sens, written into the stand-in pad's right stick (gameinput.rs, MouseLook::BASE_SENS / MouseLook::step). That is the right thing to expose, and the GDKX side of it is explicit: XInputOnGameInput's XINPUT_GAMEPAD says each thumbstick axis is "a signed value that is between -32768 and 32767 and describes the position of the thumbstick", and that "the constants XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE and XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE can be used as positive and negative values for filtering a thumbstick input" (GDKX docs, reference/input/xinputongameinput/structs/xinput_gamepad.md, the sThumbLX paragraph). So the title filters the stick through its own dead zone and applies its own sensitivity on top: warping the mouse instead of scaling the deflection would fight both, while a multiplier of the deflection composes with them — and the multiplier is what a player wants to reach for.

How

  • the value moves into one atomic in victory-gpu (KBM_MOUSE_SENS, plus kbm_mouse_sens() / set_kbm_mouse_sens()), placed next to SETTINGS_MENU_OPEN — the atomic the input module already reads from this crate for the same reason, so no new cross-crate coupling is added;
  • gameinput.rs keeps its meaning and simply reads the getter; unset is still 1, and a VICTORY_MOUSE_SENS set before the start still wins (the first read of the getter takes it);
  • the menu row is live: true and rides the same path as the other live rows (FPS AT THE TOP, STATS PANEL) in Menu::apply_live: the environment is updated too, so the row is written into the settings file and old configs keep working.

Relation to other work

  • #989 — the mouse on the stand-in pad's right stick, and the variable this row edits.
  • #1002 — capture and warp paused while the window is dragged: the same capture state, untouched here.
  • #982 — the launcher picks the keyboard pad's keys (VICTORY_KEYMAP); the look's strength is the other half of "make the pad feel like a mouse", and it belongs in the menu rather than in another variable set before the start.

Test

cargo check -p victory-gpu --target x86_64-pc-windows-msvc clean. A release build with this row on top of a play-test stack of 12 performance PRs is green in CI: https://github.com/Alxspb/VIctory-NVIDIA/actions/runs/46150609666 (exe 11 606 528 bytes, sha256 da50a61e5c0b9fd72829718f5555d189683038cc75db0afcc1a3b7169d4d08da). Play-test on an RTX 5060 Ti 16 GB / i5-13600KF (Series S job, DLSS Quality, 2x frame generation) is with the tester now; I will report back here either way.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5541043444 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1149). Originally posted by [Alxspb](https://github.com/Alxspb) on 2026-11-28T14:17:02Z. --- ## What One new row in the F1 settings menu — `MOUSE LOOK SENSITIVITY` — that changes the keyboard-and-mouse look's multiplier **at once**, without restarting the game. > **Stacked on #989.** GitHub cannot take another fork's branch as the base, so this PR is against `main` and its diff carries #989's two commits as well. Only the **last commit** (`de4b21b`) is new here; after #989 lands, this becomes a one-commit diff. ## Why it matters `VICTORY_MOUSE_SENS` (from #989) is read once into a `LazyLock`, at the first poll ([gameinput.rs:1487](https://github.com/trustno1-coder/VIctory-NVIDIA/blob/main/crates/victory-hle/src/modules/gameinput.rs)). Matching that number to the title's own look slider therefore means: close the game, edit the environment, start again, sit through the one-time shader recompile — minutes per attempt, at something a player judges in seconds while moving the mouse. The multiplier scales deflection per pixel in **stick space**: `BASE_SENS` (0.022) times `sens`, written into the stand-in pad's right stick (`gameinput.rs`, `MouseLook::BASE_SENS` / `MouseLook::step`). That is the right thing to expose, and the GDKX side of it is explicit: `XInputOnGameInput`'s `XINPUT_GAMEPAD` says each thumbstick axis is "a signed value that is between -32768 and 32767 and describes the position of the thumbstick", and that "the constants XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE and XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE can be used as positive and negative values for filtering a thumbstick input" (GDKX docs, `reference/input/xinputongameinput/structs/xinput_gamepad.md`, the `sThumbLX` paragraph). So the title filters the stick through its own dead zone and applies its own sensitivity on top: warping the mouse instead of scaling the deflection would fight both, while a multiplier of the deflection composes with them — and the multiplier is what a player wants to reach for. ## How - the value moves into one atomic in `victory-gpu` (`KBM_MOUSE_SENS`, plus `kbm_mouse_sens()` / `set_kbm_mouse_sens()`), placed next to `SETTINGS_MENU_OPEN` — the atomic the input module already reads from this crate for the same reason, so no new cross-crate coupling is added; - `gameinput.rs` keeps its meaning and simply reads the getter; unset is still 1, and a `VICTORY_MOUSE_SENS` set before the start still wins (the first read of the getter takes it); - the menu row is `live: true` and rides the same path as the other live rows (`FPS AT THE TOP`, `STATS PANEL`) in `Menu::apply_live`: the environment is updated too, so the row is written into the settings file and old configs keep working. ## Relation to other work - #989 — the mouse on the stand-in pad's right stick, and the variable this row edits. - #1002 — capture and warp paused while the window is dragged: the same capture state, untouched here. - #982 — the launcher picks the keyboard pad's keys (`VICTORY_KEYMAP`); the look's strength is the other half of "make the pad feel like a mouse", and it belongs in the menu rather than in another variable set before the start. ## Test `cargo check -p victory-gpu --target x86_64-pc-windows-msvc` clean. A release build with this row on top of a play-test stack of 12 performance PRs is green in CI: https://github.com/Alxspb/VIctory-NVIDIA/actions/runs/46150609666 (exe 11 606 528 bytes, `sha256 da50a61e5c0b9fd72829718f5555d189683038cc75db0afcc1a3b7169d4d08da`). Play-test on an RTX 5060 Ti 16 GB / i5-13600KF (Series S job, DLSS Quality, 2x frame generation) is with the tester now; I will report back here either way.

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
trustno1-coder/VIctory-NVIDIA!1149
No description provided.