run: gate play::load_mods() behind #[cfg(windows)] and execute #2581

Open
RanoGames wants to merge 1 commit from upstream-pr/2581 into main
RanoGames commented 2026-11-29 14:37:22 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RanoGames on 2026-11-29T14:37:22Z.


What it changes

Fixes Command::Run in apps/victory/src/main.rs:

  • mod play; is gated with #[cfg(windows)], and every other play:: call in main.rs is already behind #[cfg(windows)], but play::load_mods(); was left outside both #[cfg(windows)] and if execute after the merge in 4aef7607.
  • Moves play::load_mods(); into the #[cfg(windows)] if execute { ... } block (right after load_mfg() / load_mfg_from_menu()), matching Command::Play and avoiding loading mod DLLs into victory.exe on bind-only victory run invocations without --execute, while fixing non-Windows compilation of apps/victory.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): N/A (CLI entry-point / cfg gating fix; no title/GPU run)
  • Before: play::load_mods(); in Command::Run ran unconditionally outside #[cfg(windows)] and even when --execute was false.
  • After: play::load_mods(); only compiles on Windows and only executes when execute is true.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A
  • cargo test passed for the crates it touches: yes (cargo test --locked -p victory: 78 unit tests + 1 cache_paths + 2 census passed; cargo clippy --no-deps --locked -p victory --all-targets -- -D warnings passed)

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2434 (also touches apps/victory/src/main.rs, unrelated restart-delay logic)
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5551746615 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2581). Originally posted by [RanoGames](https://github.com/RanoGames) on 2026-11-29T14:37:22Z. --- ## What it changes Fixes `Command::Run` in `apps/victory/src/main.rs`: - `mod play;` is gated with `#[cfg(windows)]`, and every other `play::` call in `main.rs` is already behind `#[cfg(windows)]`, but `play::load_mods();` was left outside both `#[cfg(windows)]` and `if execute` after the merge in `4aef7607`. - Moves `play::load_mods();` into the `#[cfg(windows)] if execute { ... }` block (right after `load_mfg()` / `load_mfg_from_menu()`), matching `Command::Play` and avoiding loading mod DLLs into `victory.exe` on bind-only `victory run` invocations without `--execute`, while fixing non-Windows compilation of `apps/victory`. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): N/A (CLI entry-point / cfg gating fix; no title/GPU run) - Before: `play::load_mods();` in `Command::Run` ran unconditionally outside `#[cfg(windows)]` and even when `--execute` was false. - After: `play::load_mods();` only compiles on Windows and only executes when `execute` is true. - For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A - `cargo test` passed for the crates it touches: yes (`cargo test --locked -p victory`: 78 unit tests + 1 `cache_paths` + 2 `census` passed; `cargo clippy --no-deps --locked -p victory --all-targets -- -D warnings` passed) ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2434 (also touches `apps/victory/src/main.rs`, unrelated restart-delay logic)
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/2581:upstream-pr/2581'
git switch 'upstream-pr/2581'

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/2581'
git switch 'upstream-pr/2581'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2581'
git switch 'upstream-pr/2581'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2581'
git switch 'main'
git merge --squash 'upstream-pr/2581'
git switch 'main'
git merge --ff-only 'upstream-pr/2581'
git switch 'main'
git merge 'upstream-pr/2581'
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!2581
No description provided.