Minimize a private log console after startup #5010

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/5010 into main
andrewpozdnakov7-jpg commented 2026-12-01 17:15:27 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T17:15:27Z.


Refs #5002.

What it changes

victory.exe play --set VICTORY_MINIMIZE_CONSOLE=1 can minimize a private classic Windows log console after the first accepted present. This leaves startup output visible during preparation and keeps logging after the window is minimized. The window can still be opened from the taskbar.

The call is asynchronous and the console must belong to this process alone. A shared shell, a Windows Terminal pseudoconsole or a process with no console keeps its current window behavior. Microsoft's console API returns only a non-displayed handle for a pseudoconsole. Console window documentation

How it was tested

  • Windows cargo check --locked -p victory-gpu passed on 2be10963.
  • A focused Windows fixture compiled the exact present and window gates with stub Win32 calls. It requested one minimize on the first accepted present with an eligible console and no request for shared, mismatched, hidden or absent consoles, or when the switch was off. A failed or occluded initial present did not trigger it.
  • cargo xtask policy --staged passed. The patch combines cleanly with #4992.
  • The actual window and game run still need a classic-console check. Main's CI check has five existing Clippy errors tracked in #4707.

Checked for overlap

  • Searched for #5002, console minimization and open PRs touching the presenter. #4612 is about an in-game developer console. #3888 changes what happens when the fallback game window closes.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5590713909 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/5010). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T17:15:27Z. --- Refs #5002. ## What it changes `victory.exe play --set VICTORY_MINIMIZE_CONSOLE=1` can minimize a private classic Windows log console after the first accepted present. This leaves startup output visible during preparation and keeps logging after the window is minimized. The window can still be opened from the taskbar. The call is asynchronous and the console must belong to this process alone. A shared shell, a Windows Terminal pseudoconsole or a process with no console keeps its current window behavior. Microsoft's console API returns only a non-displayed handle for a pseudoconsole. [Console window documentation](https://learn.microsoft.com/en-us/windows/console/getconsolewindow) ## How it was tested - Windows `cargo check --locked -p victory-gpu` passed on `2be10963`. - A focused Windows fixture compiled the exact present and window gates with stub Win32 calls. It requested one minimize on the first accepted present with an eligible console and no request for shared, mismatched, hidden or absent consoles, or when the switch was off. A failed or occluded initial present did not trigger it. - `cargo xtask policy --staged` passed. The patch combines cleanly with #4992. - The actual window and game run still need a classic-console check. Main's [CI check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46563306780/job/142355972539) has five existing Clippy errors tracked in #4707. ## Checked for overlap - [x] Searched for #5002, console minimization and open PRs touching the presenter. #4612 is about an in-game developer console. #3888 changes what happens when the fallback game window closes. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-12-01 18:39:52 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T18:39:52Z.


The console hook applies locally to the current meter at 7724fb03. Windows cargo check --locked -p victory-gpu and the six focused console-routing scenarios passed. The staged asset check stopped on host.rs: that file is 1,064,517 bytes on main, already above the 1,048,576-byte limit. The local result is 1,065,663 bytes.

The tested update is pending the host file size fix. This PR's published head is still 2be10963.

#5064 moves the existing present queue into its own module and brings the source file below the limit. Its Windows crate check and staged asset check passed.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321298219 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/5010#issuecomment-7321298219). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T18:39:52Z. --- The console hook applies locally to the current meter at `7724fb03`. Windows `cargo check --locked -p victory-gpu` and the six focused console-routing scenarios passed. The staged asset check stopped on `host.rs`: that file is 1,064,517 bytes on main, already above the 1,048,576-byte limit. The local result is 1,065,663 bytes. The tested update is pending the host file size fix. This PR's published head is still `2be10963`. #5064 moves the existing present queue into its own module and brings the source file below the limit. Its Windows crate check and staged asset check passed.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/5010:upstream-pr/5010'
git switch 'upstream-pr/5010'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/5010'
git switch 'upstream-pr/5010'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/5010'
git switch 'upstream-pr/5010'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/5010'
git switch 'main'
git merge --squash 'upstream-pr/5010'
git switch 'main'
git merge --ff-only 'upstream-pr/5010'
git switch 'main'
git merge 'upstream-pr/5010'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!5010
No description provided.