Merge remote-tracking branch 'pr/1869' into wave-6

This commit is contained in:
trustno1-coder
2026-11-28 19:32:48 -08:00

View File

@ -6,6 +6,7 @@
# .\scripts\play-foxhound.ps1 -Exe ... -Dlss balanced -FrameGen
# .\scripts\play-foxhound.ps1 -Exe ... -SeriesS Series S profile (1280x720 inside, faster, softer)
# .\scripts\play-foxhound.ps1 -Exe ... -Build diag diagnostics build (slower; captures, timelines)
# .\scripts\play-foxhound.ps1 -Exe ... -WarmUsed warm pipelines seen in earlier runs, then exit
# .\scripts\play-foxhound.ps1 -Exe ... -More @{VICTORY_AMBIENT_SPECULAR='0'} add or override switches
#
# In the game, F1 opens a settings menu (arrow keys pick and change, Enter does it). What it saves goes to
@ -48,6 +49,7 @@ param(
# Every shader and the loading pipelines made first (`victory preload`), then the game; the F1 menu's
# PRELOAD SHADERS starts this again with it.
[switch]$Preload,
[switch]$WarmUsed,
[hashtable]$More = @{}
)
$repo = Split-Path $PSScriptRoot -Parent
@ -203,10 +205,18 @@ foreach ($k in $settings.Keys) { Set-Item "Env:$k" $settings[$k] }
$logs = Join-Path $env:LOCALAPPDATA 'victory\logs'; New-Item -ItemType Directory -Force $logs | Out-Null
$log = Join-Path $logs ('victory-nvidia-{0:yyyyMMdd-HHmmss}.log' -f (Get-Date))
$writer = [IO.StreamWriter]::new($log, $false, [Text.UTF8Encoding]::new($false)); $writer.AutoFlush = $true
$writer.WriteLine("# console=$console build=$Build preload=$preload switches: " + (($settings.GetEnumerator() | Sort-Object Name | ForEach-Object { "$($_.Name)=$($_.Value)" }) -join ' '))
$writer.WriteLine("# console=$console build=$Build preload=$preload warm-used=$WarmUsed switches: " + (($settings.GetEnumerator() | Sort-Object Name | ForEach-Object { "$($_.Name)=$($_.Value)" }) -join ' '))
Write-Host "Log: $log"
Push-Location $repo # victory.toml is read from here
try {
if ($WarmUsed) {
$warmArgs = @('warm', '--used')
if ($settings.VICTORY_PRELOAD_JOBS -match '^[1-9][0-9]*$') {
$warmArgs += @('--jobs', $settings.VICTORY_PRELOAD_JOBS)
}
& $victory @warmArgs 2>&1 | ForEach-Object { $line = "$_"; $writer.WriteLine($line); $line }
exit $LASTEXITCODE
}
if ($preload) {
# With this start's switches (the translations depend on them); its lines go to the log too.
Write-Host 'Preloading shaders before the game starts. This takes a while (see the lines below).'
@ -217,10 +227,8 @@ try {
$said = 'Preload {0} after {1:N1} min. Starting the game.' -f $how, ((Get-Date) - $began).TotalMinutes
$writer.WriteLine("# $said"); Write-Host $said
}
& $victory run $Exe --console $console --execute 2>&1 | ForEach-Object { $line = "$_"; $writer.WriteLine($line); $line }
}
finally { Pop-Location }
Push-Location $repo
try { & $victory run $Exe --console $console --execute 2>&1 | ForEach-Object { $line = "$_"; $writer.WriteLine($line); $line } }
finally { Pop-Location; $writer.Dispose() }
# What `victory run` returned: a title that failed is a failed start for whoever called this script.
exit $LASTEXITCODE