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

Closed
github-bot wants to merge 1 commit from github-bot/gh-551 into main AGit
Owner

@⁠Glory-star on GitHub · 2026-11-28 00:39 UTC · original
pr/fix-mouse-warp-window-drag → main · +38 −5 · 1 files · 1 commits · closed without merging

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.
**@⁠Glory-star** on GitHub · 2026-11-28 00:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/551) `pr/fix-mouse-warp-window-drag` → `main` · +38 −5 · 1 files · 1 commits · closed without merging ### 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 00:41:21 +00:00
github-bot closed this pull request 2026-11-28 00:49:51 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.