feat(victory-hle,victory-gpu): VICTORY_WINDOW_OFFSCREEN=1 keeps the title's window off every screen #1009

Manually merged
github merged 1 commit from github-bot/gh-1009 into main 2026-11-29 08:21:52 +00:00 AGit
Owner

@⁠whoalin1 on GitHub · 2026-11-28 10:59 UTC · original
whoalin1:pr/offscreen-window → main · +57 −5 · 2 files · 1 commits · merged 2026-11-29 08:16 UTC

Summary

Ports ScarlettPort 5831360 to add opt-in VICTORY_WINDOW_OFFSCREEN=1 (off by default) for background/automated test runs.

When enabled:

  • Top-level title windows in victory-hle/src/modules/lifecycle.rs and fallback windows in victory-gpu/src/host.rs are created at (-32000, -32000) with WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE (no taskbar button, never steals focus/keyboard).
  • WM_WINDOWPOSCHANGING in window_proc keeps top-level windows off-screen without minimizing or hiding them, so rendering, presents, and VICTORY_KEYS continue working normally.
  • fullscreen() and capture_mouse() are skipped while offscreen mode is active.

Verification

Verified on Windows (x86_64-pc-windows-msvc, RTX 4070 SUPER):

  • git diff --check origin/main..HEAD — clean
  • cargo run --locked -p xtask -- policy — asset policy: 294 files ok
  • cargo clippy --workspace --all-targets --locked & --all-features — 0 warnings in touched files
  • cargo test --release -p victory-hle --locked --lib — 188 passed, 0 failed, 3 ignored (hle-probe fixture: 1 passed); cargo test --release -p victory-gpu --locked --no-run passed
**@⁠whoalin1** on GitHub · 2026-11-28 10:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1009) `whoalin1:pr/offscreen-window` → `main` · +57 −5 · 2 files · 1 commits · merged 2026-11-29 08:16 UTC ## Summary Ports `ScarlettPort` `5831360` to add opt-in `VICTORY_WINDOW_OFFSCREEN=1` (off by default) for background/automated test runs. When enabled: - Top-level title windows in [`victory-hle/src/modules/lifecycle.rs`](crates/victory-hle/src/modules/lifecycle.rs) and fallback windows in [`victory-gpu/src/host.rs`](crates/victory-gpu/src/host.rs) are created at `(-32000, -32000)` with `WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE` (no taskbar button, never steals focus/keyboard). - `WM_WINDOWPOSCHANGING` in `window_proc` keeps top-level windows off-screen without minimizing or hiding them, so rendering, presents, and `VICTORY_KEYS` continue working normally. - `fullscreen()` and `capture_mouse()` are skipped while offscreen mode is active. ## Verification Verified on Windows (`x86_64-pc-windows-msvc`, RTX 4070 SUPER): - `git diff --check origin/main..HEAD` — clean - `cargo run --locked -p xtask -- policy` — `asset policy: 294 files ok` - `cargo clippy --workspace --all-targets --locked` & `--all-features` — 0 warnings in touched files - `cargo test --release -p victory-hle --locked --lib` — 188 passed, 0 failed, 3 ignored (`hle-probe` fixture: 1 passed); `cargo test --release -p victory-gpu --locked --no-run` passed
Port of ScarlettPort 5831360 for background test runs (nothing of a test may
show on the user's screen). Off by default. The title's top-level window is
created at -32000,-32000 with WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE (no taskbar
button, never takes the keyboard), and our window procedure keeps every later
move there (WM_WINDOWPOSCHANGING, on the title's own thread). Not minimized or
hidden, so the title renders and presents as before; VICTORY_KEYS works
without focus. This fork's VICTORY_FULLSCREEN and VICTORY_MOUSE_CAPTURE are
skipped while it is on. The GPU crate's fallback window follows the switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:31:44 +00:00
github-bot force-pushed github-bot/gh-1009 from a46e774116 to 5899d752d3 2026-11-28 22:46:46 +00:00 Compare
github manually merged commit 7b90192397 into main 2026-11-29 08:21:52 +00:00
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!1009
No description provided.