Window and input: fullscreen, English IME, and a mouse capture that leaves the pointer alone #14
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!14
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-14"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@superboynick on GitHub · 2026-11-27 02:46 UTC · original
superboynick:pr/mouse-capture-fix→main· +341 −6 · 2 files · 1 commits · closed without mergingWindow and input work that a player notices before anything else. Three switches, each defaulting to 1 and each set to 0 restoring the behaviour before this change.
Fullscreen (
VICTORY_FULLSCREEN): borderless window at the display's size with its frame removed;VICTORY_FULLSCREEN_RES=1920x1080picks another size. The swap chain is untouched — this fork's chain is 3840x2160 whatever the window says — so presenting does not change.English input method (
VICTORY_IME_ENGLISH): the window's input context is switched to en-US at start-up, because a Chinese IME in the game turns key presses into candidate windows. When the layout is not installed it logs once and does nothing else.Mouse capture (
VICTORY_MOUSE_CAPTURE): the pointer is clipped to the client area and hidden while our window has focus, released on focus loss. This also fixes a mistake in the mouse device merged as #9: that code warped the pointer back to the centre after every sample, which pins the absolute position the title reads, so the camera looks frozen — "mouse capture does not work at all", as the player reported. Warping is now a separate switch,VICTORY_MOUSE_WARP=0by default; with it on, the delta is taken from the centre rather than the previous sample, so turning keeps working past the screen edge without pointer drift.Measured on an RTX 5070 Ti Laptop (12 GB, 32-lane waves), Windows 11: window rect 0,0–1920,1080, client area the same,
GetClipCursorreturning the same rectangle, title in front.cargo build --release -p victory,cargo build --profile diag -p victory --features diagnostics, andcargo test -p victory-hle(158 passed, 2 ignored) pass.Written with an AI assistant.
@superboynick on GitHub · 2026-11-27 04:12 UTC · original
Superseded by the branch built on today's main; that one applies cleanly.
Pull request closed