fix(input): pause mouse capture and warp while dragging or resizing the window #551

Closed
Glory-star wants to merge 1 commit from upstream-pr/551 into main
Glory-star commented 2026-11-28 00:39:58 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Glory-star on 2026-11-28T00:39:58Z.


Problem

When VICTORY_MOUSE_WARP=1 and VICTORY_MOUSE_CAPTURE=1 are enabled in windowed mode, grabbing the title bar to drag or resize the window triggers WM_MOVE / capture logic that re-clips and warps the cursor back to the window center mid-drag, causing the window to jump across the screen.

Fix

  • Pause mouse capture/warp in crates/victory-hle/src/modules/lifecycle.rs on WM_NCLBUTTONDOWN / WM_ENTERSIZEMOVE, and resume cleanly on WM_EXITSIZEMOVE or client-area click (WM_LBUTTONDOWN).

Verification

  • Verified on Windows 10 (19045) in 1440p/1080p windowed mode with VICTORY_MOUSE_CAPTURE=1 and VICTORY_MOUSE_WARP=1: window drags and resizes smoothly without cursor warp interference, and camera capture resumes on click inside the game window.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5535014336 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/551). Originally posted by [Glory-star](https://github.com/Glory-star) on 2026-11-28T00:39:58Z. --- ### Problem When `VICTORY_MOUSE_WARP=1` and `VICTORY_MOUSE_CAPTURE=1` are enabled in windowed mode, grabbing the title bar to drag or resize the window triggers `WM_MOVE` / capture logic that re-clips and warps the cursor back to the window center mid-drag, causing the window to jump across the screen. ### Fix - Pause mouse capture/warp in `crates/victory-hle/src/modules/lifecycle.rs` on `WM_NCLBUTTONDOWN` / `WM_ENTERSIZEMOVE`, and resume cleanly on `WM_EXITSIZEMOVE` or client-area click (`WM_LBUTTONDOWN`). ### Verification - Verified on Windows 10 (19045) in 1440p/1080p windowed mode with `VICTORY_MOUSE_CAPTURE=1` and `VICTORY_MOUSE_WARP=1`: window drags and resizes smoothly without cursor warp interference, and camera capture resumes on click inside the game window.

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!551
No description provided.