Cursor: the title's window answers WM_SETCURSOR with a pad too #2809

Open
github-bot wants to merge 11 commits from github-bot/gh-2809 into main AGit
Owner

@⁠tribbedev on GitHub · 2026-11-29 17:34 UTC · original
tribbedev:cursor-pad → main · +779 −822 · 33 files · 11 commits · open

Fixes #2807

What it changes

The title's window answers WM_SETCURSOR for every start now, a pad's too.

A launcher (the script, play-foxhound.exe, Steam) makes the shell set Windows'
"app starting" cursor — the arrow with the ring — for the window it hands over,
and only an answer to WM_SETCURSOR clears it. The window the title creates
carries no cursor of its own (its class's hCursor is null), and
lifecycle.rs answered only when the mouse and keyboard were on
(mnk::enabled()), so a start played with a pad kept that ring beside the
pointer for the whole session — over the picture, in a screenshot, and in a
stream (Parsec) just the same.

The branch itself is unchanged: the arrow while the F1 menu is open, no cursor at
all while the title plays (it draws its own where it wants one). What is gone is
the condition that made it the mouse and keyboard's branch alone. The
native-mouse branch below it is untouched, and the two cannot both run: this one
is gated on !native_mouse_enabled().

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray
    tracing): GeForce RTX 3080 Ti, Windows 11 (x64), Series X profile, -Res 1080to1440, DLSS quality, frame generation 2x, MOUSE AND KEYBOARD off
    (VICTORY_MNK=0, Steam Input's virtual pad for a Stadia controller), ray
    tracing off.
  • Before: the arrow with the ring beside the pointer from the title screen into
    the world, in a window, in a screenshot and in a Parsec session; with
    VICTORY_MNK=1 it did not happen.
  • After: the build and the start are tested here (see below); the picture itself
    I cannot look at from this side. The session that reported it runs on this
    build, and I will add what it sees here.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): none, no
    shader changes.
  • cargo test passed for the crates it touches: yes — cargo build --release --locked -p victory, cargo test --release --locked -p victory-hle
    (423 + 2), no new warning (rustfmt clean on the file).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files
    this touches. Related: #591 (window moves and the F1 menu's motion kept out of
    the captured mouse) and #2734 (the captured mouse to the virtual pad in AUTO)
    are about the captured mouse, not the window's cursor;
    #2225, #989, #1739 and #652 are mouse-look layouts and bindings. None of them
    touches WM_SETCURSOR in crates\victory-hle\src\modules\lifecycle.rs, which
    is the only file here.
**@⁠tribbedev** on GitHub · 2026-11-29 17:34 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2809) `tribbedev:cursor-pad` → `main` · +779 −822 · 33 files · 11 commits · open Fixes #2807 ## What it changes The title's window answers `WM_SETCURSOR` for every start now, a pad's too. A launcher (the script, `play-foxhound.exe`, Steam) makes the shell set Windows' "app starting" cursor — the arrow with the ring — for the window it hands over, and only an answer to `WM_SETCURSOR` clears it. The window the title creates carries no cursor of its own (its class's `hCursor` is null), and `lifecycle.rs` answered only when the mouse and keyboard were on (`mnk::enabled()`), so a start played with a pad kept that ring beside the pointer for the whole session — over the picture, in a screenshot, and in a stream (Parsec) just the same. The branch itself is unchanged: the arrow while the F1 menu is open, no cursor at all while the title plays (it draws its own where it wants one). What is gone is the condition that made it the mouse and keyboard's branch alone. The native-mouse branch below it is untouched, and the two cannot both run: this one is gated on `!native_mouse_enabled()`. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): GeForce RTX 3080 Ti, Windows 11 (x64), Series X profile, `-Res 1080to1440`, DLSS quality, frame generation 2x, MOUSE AND KEYBOARD off (`VICTORY_MNK=0`, Steam Input's virtual pad for a Stadia controller), ray tracing off. - Before: the arrow with the ring beside the pointer from the title screen into the world, in a window, in a screenshot and in a Parsec session; with `VICTORY_MNK=1` it did not happen. - After: the build and the start are tested here (see below); the picture itself I cannot look at from this side. The session that reported it runs on this build, and I will add what it sees here. - For shader changes, the wave sizes tested (32 and/or 64 lanes): none, no shader changes. - `cargo test` passed for the crates it touches: yes — `cargo build --release --locked -p victory`, `cargo test --release --locked -p victory-hle` (423 + 2), no new warning (`rustfmt` clean on the file). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #591 (window moves and the F1 menu's motion kept out of the captured mouse) and #2734 (the captured mouse to the virtual pad in AUTO) are about the captured mouse, not the window's cursor; #2225, #989, #1739 and #652 are mouse-look layouts and bindings. None of them touches `WM_SETCURSOR` in `crates\victory-hle\src\modules\lifecycle.rs`, which is the only file here.
Started through a launcher (the script, play-foxhound.exe, Steam), the shell
sets Windows' "app starting" cursor — the arrow with the ring — for the window
it is about to hand over, and clears it when the program answers WM_SETCURSOR.
The title cannot: its window class carries no cursor of its own, and the layer
answered only when the mouse and keyboard were on (`mnk::enabled()`), so a start
played with a pad kept that ring beside the pointer for the whole session — over
the picture, in a screenshot, and through a stream (Parsec) just the same.

The answer is given for every start now: the arrow while the F1 menu is open
(the rest of that branch is unchanged), no cursor at all while the title plays —
it draws its own where it wants one, and a pad has no pointer to show.

Verified: cargo build --release --locked -p victory, and cargo test --release
--locked -p victory-hle (423 + 2), no new warning. What the branch does is
unchanged and already exercised by every start with the mouse and keyboard on;
with the condition gone it is the pad's start that reaches it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 17:39:08 +00:00
Author
Owner

@⁠tribbedev on GitHub · 2026-11-29 17:40 UTC · original

The check job is red on something this PR does not touch:

error: function `unwind_copy` is never used
  --> crates\victory-loader\src\crash.rs:804:15
  = note: `-D dead-code` implied by `-D warnings`

git diff --stat 55d06914..HEAD here is crates\victory-hle\src\modules\lifecycle.rs
only (6 insertions, 2 deletions), and crash.rs was last changed by c777d871
("Merge branch 'wave-3' into combined") — so main is what the workspace clippy
fails on, which is #1267.

Nothing else of the CI ran: both clippy steps stop at that error, so cargo test --workspace never starts. What I ran locally on this branch: cargo build --release --locked -p victory (ok) and cargo test --release --locked -p victory-hle (423 + 2 passed); cargo clippy -p victory-hle --all-targets -- -D warnings stops at the same victory-loader finding, from a different feature set.

Happy to rebase once main is green. If you would rather have CI green with this
PR, say so and I will add the one-line #[expect(dead_code)] (or the removal) to
crash.rs here — I left it out because it is not this change's business.

**@⁠tribbedev** on GitHub · 2026-11-29 17:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2809#issuecomment-7259874786) The `check` job is red on something this PR does not touch: ``` error: function `unwind_copy` is never used --> crates\victory-loader\src\crash.rs:804:15 = note: `-D dead-code` implied by `-D warnings` ``` `git diff --stat 55d06914..HEAD` here is `crates\victory-hle\src\modules\lifecycle.rs` only (6 insertions, 2 deletions), and `crash.rs` was last changed by `c777d871` ("Merge branch 'wave-3' into combined") — so `main` is what the workspace clippy fails on, which is #1267. Nothing else of the CI ran: both clippy steps stop at that error, so `cargo test --workspace` never starts. What I ran locally on this branch: `cargo build --release --locked -p victory` (ok) and `cargo test --release --locked -p victory-hle` (423 + 2 passed); `cargo clippy -p victory-hle --all-targets -- -D warnings` stops at the same `victory-loader` finding, from a different feature set. Happy to rebase once main is green. If you would rather have CI green with this PR, say so and I will add the one-line `#[expect(dead_code)]` (or the removal) to `crash.rs` here — I left it out because it is not this change's business.
github-bot force-pushed github-bot/gh-2809 from 1a6b06dbc1 to 6514b42bf5 2026-11-29 22:01:09 +00:00 Compare
github-bot force-pushed github-bot/gh-2809 from 6514b42bf5 to 3c58663bb6 2026-11-30 16:21:55 +00:00 Compare
Author
Owner

@⁠tribbedev on GitHub · 2026-11-30 16:57 UTC · original

The check job stopped in main's own gate, not in this change: cargo clippy --workspace --all-targets -- -D warnings fails on main at five places before it
reaches anything of this branch (7addcfc7 left card_pass's two test calls at
five arguments, plus four lints), so neither clippy step nor cargo test --workspace ever ran.

That is repaired on its own, so this PR stays one change: #4166. Both clippy steps
pass with it on top of main (-D warnings, default and --all-features). Once it
lands I will rebase this branch and let the job run through the tests here.

**@⁠tribbedev** on GitHub · 2026-11-30 16:57 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2809#issuecomment-7285493904) The `check` job stopped in main's own gate, not in this change: `cargo clippy --workspace --all-targets -- -D warnings` fails on `main` at five places before it reaches anything of this branch (`7addcfc7` left `card_pass`'s two test calls at five arguments, plus four lints), so neither clippy step nor `cargo test --workspace` ever ran. That is repaired on its own, so this PR stays one change: #4166. Both clippy steps pass with it on top of `main` (`-D warnings`, default and `--all-features`). Once it lands I will rebase this branch and let the job run through the tests here.
github-bot force-pushed github-bot/gh-2809 from 3c58663bb6 to d19c945c39 2026-11-30 18:10:05 +00:00 Compare
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 08:41 UTC · original

GitHub currently marks this PR DIRTY and compares 33 files. I cherry-picked your cursor commit d19c945 onto current main 5fabb46. Git retained your original author and date. The result is one commit, 8d5b2e6, touching only lifecycle.rs (+6/−2).

Branch for updating this PR

I replayed the exact WM_SETCURSOR branch with seven synthetic inputs on each revision. Main left the pad's two foreground client cases unhandled. The rebased commit handles both, hiding the cursor during play and setting the arrow for F1. The other five cases matched, including the background, nonclient and native-mouse cases.

cargo check --locked -p victory-hle passed on Windows. cargo xtask policy passed. In-game cursor behaviour still needs a run on the original setup.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 08:41 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2809#issuecomment-7305640364) GitHub currently marks this PR `DIRTY` and compares 33 files. I cherry-picked your cursor commit `d19c945` onto current main `5fabb46`. Git retained your original author and date. The result is one commit, `8d5b2e6`, touching only `lifecycle.rs` (+6/−2). [Branch for updating this PR](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/tree/review/2809-cursor-current-main) I replayed the exact `WM_SETCURSOR` branch with seven synthetic inputs on each revision. Main left the pad's two foreground client cases unhandled. The rebased commit handles both, hiding the cursor during play and setting the arrow for F1. The other five cases matched, including the background, nonclient and native-mouse cases. `cargo check --locked -p victory-hle` passed on Windows. `cargo xtask policy` passed. In-game cursor behaviour still needs a run on the original setup.
This pull request has changes conflicting with the target branch.
  • apps/victory/src/play.rs
  • crates/victory-gpu/src/shadow.rs
  • crates/victory-hle/src/modules/xmem.rs
  • scripts/play-nvidia.ps1
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2809/head:github-bot/gh-2809'
git switch 'github-bot/gh-2809'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2809'
git switch 'github-bot/gh-2809'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2809'
git switch 'github-bot/gh-2809'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2809'
git switch 'main'
git merge --squash 'github-bot/gh-2809'
git switch 'main'
git merge --ff-only 'github-bot/gh-2809'
git switch 'main'
git merge 'github-bot/gh-2809'
git push origin 'main'
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!2809
No description provided.