fix(menu): support silent warmup and F1 restarts without console popup #406

Manually merged
github merged 1 commit from github-bot/gh-406 into gh-pr/406/base 2026-12-03 19:05:55 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-03 18:47 UTC · original
Androtim:fix/silent-warmup-restart → main · +117 −17 · 3 files · 1 commits · merged 2026-12-03 19:02 UTC

Summary

Removes the jarring visible PowerShell/CMD console popup during first-launch Frame Gen warm-up auto-restart and F1 Save and Restart when launched headless from a GUI launcher.

Changes

  • Parent-managed restart (VICTORY_RESTART_EXIT_CODE): In crates/victory-gpu/src/host/menu.rs, when VICTORY_RESTART_EXIT_CODE is set to a valid non-zero u32 (1..=255) and preload == false, Menu::restart skips spawning PowerShell and exits cleanly via crate::ending::end_process(code, true) so the parent launcher can silently relaunch MiniVI.exe while keeping process tracking intact. (VICTORY_WARMUP_MARK continues to be written before self.restart(false).)
  • Silent headless fallback: When falling back to self-relaunch with no attached console (GetConsoleWindow().is_null()) or VICTORY_NO_CONSOLE=1, CreateProcessW uses CREATE_NO_WINDOW instead of CREATE_NEW_CONSOLE, passes -WindowStyle Hidden to powershell.exe, and omits the interactive Read-Host prompt (which would otherwise hang invisibly). Interactive console launches preserve the exact existing CREATE_NEW_CONSOLE + Read-Host behavior.
  • Environment inheritance: Preserves VICTORY_NO_CONSOLE and VICTORY_RESTART_EXIT_CODE in pps/victory/src/play.rs KEPT so child restarts inherit them cleanly.
  • Unit tests: Added tests covering VICTORY_RESTART_EXIT_CODE parsing, console vs. headless command-line generation, and KEPT env var preservation.

Verification

  • cargo test -p victory-gpu --lib host::menu (8 passed)
  • cargo test -p victory (48 unit + 2 integration passed)
  • cargo clippy --workspace --all-targets -- -D warnings (clean)
  • cargo xtask policy (sset policy: 353 files ok)
**@⁠Androtim** on GitHub · 2026-12-03 18:47 UTC · [original](https://github.com/Androtim/MiniVI/pull/406) `Androtim:fix/silent-warmup-restart` → `main` · +117 −17 · 3 files · 1 commits · merged 2026-12-03 19:02 UTC ## Summary Removes the jarring visible PowerShell/CMD console popup during first-launch Frame Gen warm-up auto-restart and F1 **Save and Restart** when launched headless from a GUI launcher. ## Changes - **Parent-managed restart (VICTORY_RESTART_EXIT_CODE)**: In crates/victory-gpu/src/host/menu.rs, when VICTORY_RESTART_EXIT_CODE is set to a valid non-zero u32 (1..=255) and preload == false, Menu::restart skips spawning PowerShell and exits cleanly via crate::ending::end_process(code, true) so the parent launcher can silently relaunch MiniVI.exe while keeping process tracking intact. (VICTORY_WARMUP_MARK continues to be written before self.restart(false).) - **Silent headless fallback**: When falling back to self-relaunch with no attached console (GetConsoleWindow().is_null()) or VICTORY_NO_CONSOLE=1, CreateProcessW uses CREATE_NO_WINDOW instead of CREATE_NEW_CONSOLE, passes -WindowStyle Hidden to powershell.exe, and omits the interactive Read-Host prompt (which would otherwise hang invisibly). Interactive console launches preserve the exact existing CREATE_NEW_CONSOLE + Read-Host behavior. - **Environment inheritance**: Preserves VICTORY_NO_CONSOLE and VICTORY_RESTART_EXIT_CODE in pps/victory/src/play.rs KEPT so child restarts inherit them cleanly. - **Unit tests**: Added tests covering VICTORY_RESTART_EXIT_CODE parsing, console vs. headless command-line generation, and KEPT env var preservation. ## Verification - cargo test -p victory-gpu --lib host::menu (8 passed) - cargo test -p victory (48 unit + 2 integration passed) - cargo clippy --workspace --all-targets -- -D warnings (clean) - cargo xtask policy (sset policy: 353 files ok)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 18:49:16 +00:00
github-bot changed target branch from main to gh-pr/406/base 2026-12-03 19:05:53 +00:00
github manually merged commit 4275dfffde into gh-pr/406/base 2026-12-03 19:05:55 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-03 19:02 UTC · original

Audited full diff (4275dfff, CI check PASS, 100% title-neutral): clean launcher/menu restart UX fix (play.rs, Cargo.toml, host/menu.rs) — auto-detects headless mode (GetConsoleWindow().is_null()) with CREATE_NO_WINDOW / -WindowStyle Hidden and supports parent-managed VICTORY_RESTART_EXIT_CODE (1..=255). Zero GPU/shader/perf surface touched; full unit tests pass. Merging via squash.

**@⁠Androtim** on GitHub · 2026-12-03 19:02 UTC · [original](https://github.com/Androtim/MiniVI/pull/406#issuecomment-7389060907) Audited full diff (`4275dfff`, **CI `check` PASS**, `100%` title-neutral): clean launcher/menu restart UX fix (`play.rs`, `Cargo.toml`, `host/menu.rs`) — auto-detects headless mode (`GetConsoleWindow().is_null()`) with `CREATE_NO_WINDOW` / `-WindowStyle Hidden` and supports parent-managed `VICTORY_RESTART_EXIT_CODE` (`1..=255`). Zero GPU/shader/perf surface touched; full unit tests pass. Merging via squash.
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/Androtim--MiniVI!406
No description provided.