Window and input: fullscreen, English IME, and a mouse capture that leaves the pointer alone #17

Manually merged
github merged 1 commit from github-bot/gh-17 into main 2026-11-27 06:10:34 +00:00 AGit
Owner

@⁠superboynick on GitHub · 2026-11-27 04:12 UTC · original
superboynick:pr/window-input-v2 → main · +211 −9 · 3 files · 1 commits · merged 2026-11-27 06:09 UTC

Redone on top of today's main (9d6300f) so it applies cleanly; the first version was cut from an older tree and conflicted.

Three switches, each on by default, each set to 0 restoring exactly the behaviour before it.

Fullscreen (VICTORY_FULLSCREEN): borderless at the display's size with the frame removed; VICTORY_FULLSCREEN_RES=1920x1080 picks another size. The swap chain is untouched (this fork's chain is 3840x2160 whatever the window says), so nothing about presenting changes.

English input method (VICTORY_IME_ENGLISH): the window's input context is switched to en-US at start-up — 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. It 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, off by default; with it on the delta is taken from the centre rather than the previous sample, so turning keeps working past the screen edge.

Measured on an RTX 5070 Ti Laptop (12 GB, 32-lane waves), Windows 11: window 0,0–1920,1080, client area the same, GetClipCursor returning the same rectangle, title in front; the game ran at 9–10 fps with DLSS and frame generation through the afternoon.

cargo build --release and --profile diag pass; cargo test -p victory-hle: 162 passed, 2 ignored.

Written with an AI assistant.

**@⁠superboynick** on GitHub · 2026-11-27 04:12 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/17) `superboynick:pr/window-input-v2` → `main` · +211 −9 · 3 files · 1 commits · merged 2026-11-27 06:09 UTC Redone on top of today's `main` (`9d6300f`) so it applies cleanly; the first version was cut from an older tree and conflicted. Three switches, each on by default, each set to 0 restoring exactly the behaviour before it. **Fullscreen** (`VICTORY_FULLSCREEN`): borderless at the display's size with the frame removed; `VICTORY_FULLSCREEN_RES=1920x1080` picks another size. The swap chain is untouched (this fork's chain is 3840x2160 whatever the window says), so nothing about presenting changes. **English input method** (`VICTORY_IME_ENGLISH`): the window's input context is switched to en-US at start-up — 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. It 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`, off by default; with it on the delta is taken from the centre rather than the previous sample, so turning keeps working past the screen edge. Measured on an RTX 5070 Ti Laptop (12 GB, 32-lane waves), Windows 11: window `0,0–1920,1080`, client area the same, `GetClipCursor` returning the same rectangle, title in front; the game ran at 9–10 fps with DLSS and frame generation through the afternoon. `cargo build --release` and `--profile diag` pass; `cargo test -p victory-hle`: 162 passed, 2 ignored. Written with an AI assistant.
Three switches, each on by default, each 0 restoring the behaviour before it: VICTORY_FULLSCREEN (borderless, VICTORY_FULLSCREEN_RES for another size), VICTORY_IME_ENGLISH (the window's input context to en-US), and VICTORY_MOUSE_CAPTURE (clip to the client area and hide the pointer, release on focus loss).

Capture also fixes a mistake in the mouse device merged as #9: it warped the pointer back to the centre after every sample, which pins the absolute position the title reads and makes the camera look frozen. Warping is now VICTORY_MOUSE_WARP, off by default; with it on the delta is taken from the centre.

Measured on an RTX 5070 Ti Laptop (12 GB): window 0,0-1920,1080 with a client area of the same size and GetClipCursor returning it. cargo build --release and --profile diag pass, cargo test -p victory-hle: 162 passed, 2 ignored.

Written with an AI assistant.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 04:15:14 +00:00
github manually merged commit c8212dfe92 into main 2026-11-27 06:10:34 +00:00
Author
Owner

@⁠superboynick on GitHub · 2026-11-27 07:11 UTC · original

Measured on an RTX 5070 Ti Laptop (12 GB), with --console series-s: frame generation and the DLSS upscale do not both run. With VICTORY_FRAME_GEN set, the layers DLSS path is never entered (DLSS: started never appears) and the 720p picture is stretched instead of reconstructed. Same build, same place, only VICTORY_FRAME_GEN changed: 1 -> DLSS started, 9.3 fps; 3 -> no DLSS at all, 9.8 fps. The README notes that ray tracing and frame generation do not work together, but not this one, and the natural thing to do is turn both on. Also: DLSS needs --console series-s; without it the code is never called and says nothing. Written with an AI assistant.

**@⁠superboynick** on GitHub · 2026-11-27 07:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/17#issuecomment-7212224570) Measured on an RTX 5070 Ti Laptop (12 GB), with --console series-s: frame generation and the DLSS upscale do not both run. With VICTORY_FRAME_GEN set, the layers DLSS path is never entered (DLSS: started never appears) and the 720p picture is stretched instead of reconstructed. Same build, same place, only VICTORY_FRAME_GEN changed: 1 -> DLSS started, 9.3 fps; 3 -> no DLSS at all, 9.8 fps. The README notes that ray tracing and frame generation do not work together, but not this one, and the natural thing to do is turn both on. Also: DLSS needs --console series-s; without it the code is never called and says nothing. Written with an AI assistant.
This discussion has been locked. Commenting is limited to contributors.
No description provided.