MnK profile: a bindable mouse wheel, and mouse motion by raw input instead of cursor polling #1485

Closed
opened 2026-11-28 20:43:36 +00:00 by Jesper-Andersson · 2 comments
Jesper-Andersson commented 2026-11-28 20:43:36 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Jesper-Andersson on 2026-11-28T20:43:36Z.


Checked on main 923e38c. This is a proposal, not a bug report.

State on main

  • crates/victory-hle/src/modules/mnk.rs: bindings are virtual-key codes read with GetAsyncKeyState. key() (line 37 on) knows MOUSE1..MOUSE5 and hex codes. The wheel has no virtual key and no state to poll, so it cannot be bound. The in-game zoom prompts (D-pad up/down) therefore have no mouse input.
  • Mouse motion: sample() (line 223) polls GetCursorPos about every 8 ms and recenter() (lines 164-185) puts the cursor back at the window centre with SetCursorPos. There is no WM_INPUT or RegisterRawInputDevices on main.

Proposal (not tested on main)

  1. Wheel: name two inputs (for example WheelUp / WheelDown) that the window hook fills from WM_MOUSEWHEEL, bindable to any button, with D-pad up/down as the example. One notch makes one press held about 70 ms, then a gap, so a frame at 15-25 fps sees it. #652, #482 and #1356 do a version of this inside their own mappings; main's bindings file has no way to say it.
  2. Raw input: register the mouse for WM_INPUT and sum lLastX / lLastY between polls. Pointer acceleration ("enhance pointer precision") and clipping at a screen edge would no longer change the counts, and the cursor would not need a warp every 8 ms. That also removes the pull that fights window dragging (see #1002).

Expected, not measured

  • Raw deltas should be steadier than cursor deltas that pass through Windows pointer ballistics. Whether this changes the "delayed, inconsistent, stuttery" look in #1308 is unknown; the poll interval and the recentre may play a part there, and I have not isolated it.
  • No cost figure.

Alternatives: #1356, per its title, does native 1:1 mouse aiming, and it already registers raw input (RegisterRawInputDevices) for that, so part of item 2 overlaps with it; #989 ("the camera follows the mouse") and #482 are other mouse-look PRs; #1195 and #1149 tune the existing stick mapping. This proposal keeps the stick mapping and only changes where the numbers come from and what the wheel can do.

On our fork a wheel binding and a raw-input option are written but have not been played yet, so I cannot say how they feel.

PC: RTX 2070 SUPER 8 GB, Ryzen 7 5800X, 32 GB, Windows 11.

This was written with AI assistance (Claude Code).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6670917775 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1485). Originally posted by [Jesper-Andersson](https://github.com/Jesper-Andersson) on 2026-11-28T20:43:36Z. --- Checked on main `923e38c`. This is a proposal, not a bug report. **State on main** - `crates/victory-hle/src/modules/mnk.rs`: bindings are virtual-key codes read with `GetAsyncKeyState`. `key()` (line 37 on) knows `MOUSE1`..`MOUSE5` and hex codes. The wheel has no virtual key and no state to poll, so it cannot be bound. The in-game zoom prompts (D-pad up/down) therefore have no mouse input. - Mouse motion: `sample()` (line 223) polls `GetCursorPos` about every 8 ms and `recenter()` (lines 164-185) puts the cursor back at the window centre with `SetCursorPos`. There is no `WM_INPUT` or `RegisterRawInputDevices` on main. **Proposal (not tested on main)** 1. Wheel: name two inputs (for example `WheelUp` / `WheelDown`) that the window hook fills from `WM_MOUSEWHEEL`, bindable to any button, with D-pad up/down as the example. One notch makes one press held about 70 ms, then a gap, so a frame at 15-25 fps sees it. #652, #482 and #1356 do a version of this inside their own mappings; main's bindings file has no way to say it. 2. Raw input: register the mouse for `WM_INPUT` and sum `lLastX` / `lLastY` between polls. Pointer acceleration ("enhance pointer precision") and clipping at a screen edge would no longer change the counts, and the cursor would not need a warp every 8 ms. That also removes the pull that fights window dragging (see #1002). **Expected, not measured** - Raw deltas should be steadier than cursor deltas that pass through Windows pointer ballistics. Whether this changes the "delayed, inconsistent, stuttery" look in #1308 is unknown; the poll interval and the recentre may play a part there, and I have not isolated it. - No cost figure. **Alternatives**: #1356, per its title, does native 1:1 mouse aiming, and it already registers raw input (`RegisterRawInputDevices`) for that, so part of item 2 overlaps with it; #989 ("the camera follows the mouse") and #482 are other mouse-look PRs; #1195 and #1149 tune the existing stick mapping. This proposal keeps the stick mapping and only changes where the numbers come from and what the wheel can do. On our fork a wheel binding and a raw-input option are written but have not been played yet, so I cannot say how they feel. PC: RTX 2070 SUPER 8 GB, Ryzen 7 5800X, 32 GB, Windows 11. This was written with AI assistance (Claude Code).
github-actions[bot] commented 2026-11-28 20:43:44 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-28T20:43:44Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7245496912 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1485#issuecomment-7245496912). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:43:44Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
trustno1-coder commented 2026-11-30 15:42:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-30T15:42:47Z.


Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is v2026.11.30.01.

If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run:

  1. The play log: the newest victory-nvidia-play-<date>-<time>-<number>.log in %LOCALAPPDATA%\victory\logs\.
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, plus the newest .crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\ if there is one from that run.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7283453598 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1485#issuecomment-7283453598). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-30T15:42:47Z. --- Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is [v2026.11.30.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.01). If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run: 1. The play log: the newest `victory-nvidia-play-<date>-<time>-<number>.log` in `%LOCALAPPDATA%\victory\logs\`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, plus the newest `.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\` if there is one from that run.
Sign in to join this conversation.
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#1485
No description provided.