Windows 10 runtime, F1 preload fix, AMD FSR download, warm-up restart, MFG Unlocker notice
- Windows 10: every pipeline was refused (E_INVALIDARG) and the game closed within seconds, because Windows 10's own Direct3D 12 stops at shader model 6.5 and the translated shaders are 6.6. victory.exe now exports D3D12SDKVersion = 614 and D3D12SDKPath = .\D3D12\. Where the GPU runs below 6.6, `play` offers Microsoft's D3D12Core.dll (Agility SDK 1.614.1, from nuget.org; pinned SHA-256 and Microsoft signature checked) into D3D12 beside the exe, then checks again and stops with a clear message if it still can't. `victory get-d3d12` does it by hand. The host logs its shader model and runtime file. Windows 11 keeps using its own newer runtime. - F1 > PRELOAD SHADERS: the restart passed the script launcher's -Preload to victory.exe, which refused it, and the window closed at once. It now sets VICTORY_PRELOAD=1, which both launchers read, and a failed restart keeps its window open. - AMD FSR 3 files: offered for download where FSR 3 would be used (`victory get-fsr`, Get-AMD-FSR.cmd, scripts\get-amd-fsr.ps1; pinned hashes, AMD signature). - First start of a new victory.exe: it ran at a flat 14 fps for the whole session and normally from the second start on. The first start now plays 20 s with a notice, marks that exe under %LOCALAPPDATA%\victory\warmed and restarts by itself once (VICTORY_WARMUP_RESTART=0: not done). - RTX 20/30 with DLSS frame generation running (MFG Unlocker as winmm.dll beside the exe): the start notice says it is unlocked by a mod, and the log names DLLs beside victory.exe. - README: the above. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
ca9c75cd6d
commit
10862a6d87
14 files changed
+653
-12
No files matched your search
@@ -0,0 +1,10 @@
|
||||
//! victory.exe exports `D3D12SDKVersion` and `D3D12SDKPath` (main.rs): Windows'
|
||||
//! Direct3D 12 reads them from the process's executable to load Microsoft's
|
||||
//! newer runtime from `D3D12\` beside it. An executable exports nothing by
|
||||
//! itself, so the linker is told to.
|
||||
fn main() {
|
||||
if std::env::var("CARGO_CFG_TARGET_ENV").as_deref() == Ok("msvc") {
|
||||
println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion,DATA");
|
||||
println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath,DATA");
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,33 @@ use std::path::PathBuf;
|
||||
use anyhow::Result;
|
||||
use clap::{Parser, Subcommand, ValueEnum};
|
||||
|
||||
/// The Direct3D 12 runtime this program asks Windows for: Microsoft's D3D12
|
||||
/// Agility SDK 1.614, from `D3D12\D3D12Core.dll` beside victory.exe where it
|
||||
/// is there (exported by build.rs). Windows uses it only where its own is
|
||||
/// older: Windows 10's stops at shader model 6.5, and the translated shaders
|
||||
/// are 6.6 (`victory play` fetches it there; 2026-11-27, an RTX 3060 on
|
||||
/// Windows 10 22H2 had every pipeline refused). Without the folder, nothing changes.
|
||||
#[cfg(windows)]
|
||||
#[unsafe(no_mangle)]
|
||||
#[used]
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub static D3D12SDKVersion: u32 = 614;
|
||||
|
||||
/// `D3D12SDKPath`'s value: a pointer to a C string.
|
||||
#[cfg(windows)]
|
||||
#[repr(transparent)]
|
||||
pub struct SdkPath(*const std::ffi::c_char);
|
||||
// SAFETY: it points at a string literal, never written.
|
||||
#[cfg(windows)]
|
||||
unsafe impl Sync for SdkPath {}
|
||||
|
||||
/// Where `D3D12Core.dll` is, from victory.exe's folder.
|
||||
#[cfg(windows)]
|
||||
#[unsafe(no_mangle)]
|
||||
#[used]
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub static D3D12SDKPath: SdkPath = SdkPath(c".\\D3D12\\".as_ptr());
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(
|
||||
name = "victory",
|
||||
@@ -150,6 +177,22 @@ enum Command {
|
||||
/// (about 70 MB) to where `play` looks for them.
|
||||
#[cfg(windows)]
|
||||
GetDlss,
|
||||
/// Fetch AMD's FSR 3 frame generation files from AMD's GitHub (about
|
||||
/// 30 MB) to where `play` looks for them: frame generation on cards
|
||||
/// without DLSS frame generation.
|
||||
#[cfg(windows)]
|
||||
GetFsr,
|
||||
/// Fetch Microsoft's newer Direct3D 12 runtime (D3D12Core.dll, about
|
||||
/// 22 MB from nuget.org) into `D3D12` beside this program: Windows 10,
|
||||
/// whose own Direct3D 12 does not run the translated shaders. `play`
|
||||
/// does it by itself where it is needed.
|
||||
#[cfg(windows)]
|
||||
GetD3d12,
|
||||
/// Print the highest shader model the default GPU runs here (`play`
|
||||
/// asks it in a process of its own).
|
||||
#[cfg(windows)]
|
||||
#[command(hide = true)]
|
||||
ShaderModel,
|
||||
/// Prepare, map and bind a title executable; with --execute, run it.
|
||||
Run {
|
||||
exe: PathBuf,
|
||||
@@ -295,6 +338,22 @@ fn main() -> Result<()> {
|
||||
Command::Play(_) => unreachable!("handled above"),
|
||||
#[cfg(windows)]
|
||||
Command::GetDlss => play::get_dlss(),
|
||||
#[cfg(windows)]
|
||||
Command::GetFsr => play::get_fsr(),
|
||||
#[cfg(windows)]
|
||||
Command::GetD3d12 => play::get_d3d12(),
|
||||
#[cfg(windows)]
|
||||
Command::ShaderModel => {
|
||||
let model = victory_hle::streamline::highest_shader_model();
|
||||
if let Some(core) = victory_hle::streamline::d3d12_core_path() {
|
||||
println!("runtime {}", core.display());
|
||||
}
|
||||
match model {
|
||||
Some((major, minor)) => println!("{major}.{minor}"),
|
||||
None => println!("none"),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Command::Run {
|
||||
exe,
|
||||
unimplemented,
|
||||
|
||||
+265
-1
@@ -12,6 +12,15 @@
|
||||
//! this program. Where they are missing, the first start asks once whether to
|
||||
//! fetch them from NVIDIA's own GitHub (`victory get-dlss` does it later);
|
||||
//! without them the title runs with its own upscaling.
|
||||
//!
|
||||
//! AMD's FSR 3 frame generation files are AMD's, likewise: on a card without
|
||||
//! DLSS Frame Generation (or with FSR 3 chosen in F1) the first start asks
|
||||
//! once whether to fetch them from AMD's own GitHub (`victory get-fsr`).
|
||||
//!
|
||||
//! The one thing that goes beside the program: on a PC whose Direct3D 12 runs
|
||||
//! no shader model 6.6 (Windows 10's own stops at 6.5), Microsoft's newer
|
||||
//! runtime, `D3D12\D3D12Core.dll` from Microsoft's NuGet package, after asking
|
||||
//! (`victory get-d3d12`). Windows loads it only from there (main.rs).
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::io::{IsTerminal, Write};
|
||||
@@ -25,6 +34,15 @@ const GAME: &str = "game_scarlett_master.exe";
|
||||
/// `scripts\get-nvidia-sdks.ps1`, run by Windows PowerShell.
|
||||
const FETCH: &str = include_str!("../../../scripts/get-nvidia-sdks.ps1");
|
||||
|
||||
/// `scripts\get-amd-fsr.ps1`, run by Windows PowerShell.
|
||||
const FETCH_FSR: &str = include_str!("../../../scripts/get-amd-fsr.ps1");
|
||||
|
||||
/// `scripts\get-d3d12.ps1`, run by Windows PowerShell.
|
||||
const FETCH_D3D12: &str = include_str!("../../../scripts/get-d3d12.ps1");
|
||||
|
||||
/// The two AMD files FSR 3 frame generation loads.
|
||||
const FSR_FILES: [&str; 2] = ["amd_fidelityfx_loader_dx12.dll", "amd_fidelityfx_framegeneration_dx12.dll"];
|
||||
|
||||
/// The settings the title is started with (`scripts\play-foxhound.ps1` has
|
||||
/// the same, with what each is for).
|
||||
const SETTINGS: &[(&str, &str)] = &[
|
||||
@@ -195,6 +213,25 @@ fn streamline_dir(here: &Path) -> Option<PathBuf> {
|
||||
named.into_iter().chain(ours).chain(beside).find(|d| has_streamline(d))
|
||||
}
|
||||
|
||||
/// Where `victory get-fsr` puts AMD's files.
|
||||
fn amd_home() -> Result<PathBuf> {
|
||||
Ok(home()?.join("amd-fidelityfx"))
|
||||
}
|
||||
|
||||
fn has_fsr(dir: &Path) -> bool {
|
||||
FSR_FILES.iter().all(|f| dir.join(f).is_file())
|
||||
}
|
||||
|
||||
/// The folder with AMD's FSR 3 files: the one `VICTORY_FIDELITYFX_DIR` names,
|
||||
/// where `get-fsr` puts them, or beside this program (a `fidelityfx` folder,
|
||||
/// a repository's `amd-sdk`, or the files themselves).
|
||||
fn fidelityfx_dir(here: &Path) -> Option<PathBuf> {
|
||||
let named = std::env::var_os("VICTORY_FIDELITYFX_DIR").filter(|v| !v.is_empty()).map(PathBuf::from);
|
||||
let ours = amd_home().ok();
|
||||
let beside = [here.join("fidelityfx"), here.join("amd-sdk").join("FidelityFX").join("bin"), here.to_path_buf()];
|
||||
named.into_iter().chain(ours).chain(beside).find(|d| has_fsr(d))
|
||||
}
|
||||
|
||||
/// The lines `NAME=value` of the menu's file.
|
||||
fn parse_menu(text: &str) -> Vec<(String, String)> {
|
||||
text.lines()
|
||||
@@ -389,6 +426,189 @@ fn offer_dlss() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Runs the AMD fetcher: AMD's FSR 3 files from AMD's GitHub into `to`.
|
||||
fn fetch_fsr(to: &Path) -> Result<()> {
|
||||
std::fs::create_dir_all(to).with_context(|| format!("creating {}", to.display()))?;
|
||||
let script = to.join("get-amd-fsr.ps1");
|
||||
std::fs::write(&script, FETCH_FSR).with_context(|| format!("writing {}", script.display()))?;
|
||||
let status = std::process::Command::new("powershell.exe")
|
||||
.args(["-NoProfile", "-ExecutionPolicy", "Bypass", "-File"])
|
||||
.arg(&script)
|
||||
.arg("-To")
|
||||
.arg(to)
|
||||
.status()
|
||||
.context("starting Windows PowerShell")?;
|
||||
let _ = std::fs::remove_file(&script);
|
||||
anyhow::ensure!(
|
||||
status.success() && has_fsr(to),
|
||||
"AMD's files did not arrive (see above); the title runs without FSR 3 frame generation"
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `victory get-fsr`.
|
||||
pub(crate) fn get_fsr() -> Result<()> {
|
||||
let to = amd_home()?;
|
||||
let _ = std::fs::remove_file(to.join("declined"));
|
||||
fetch_fsr(&to)
|
||||
}
|
||||
|
||||
/// Asks once, at a start that would use FSR 3 without AMD's files, whether to fetch them.
|
||||
fn offer_fsr(card: &str) {
|
||||
let Ok(to) = amd_home() else { return };
|
||||
let declined = to.join("declined");
|
||||
if declined.exists() || !std::io::stdin().is_terminal() {
|
||||
println!("No AMD FSR 3 files: frame generation stays off on this card (`victory get-fsr` fetches them).");
|
||||
return;
|
||||
}
|
||||
if card.is_empty() {
|
||||
println!("FSR 3 frame generation is chosen, and AMD's files for it are not on this PC yet.");
|
||||
} else {
|
||||
println!("This card ({card}) has no DLSS frame generation (it needs an RTX 40 or later), but AMD's");
|
||||
println!("FSR 3 frame generation runs on it (2x). AMD's files for it are not on this PC yet.");
|
||||
}
|
||||
println!("They are AMD's own, under AMD's licence, and come from github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK");
|
||||
println!("(about 30 MB, once).");
|
||||
print!("Download them now? [Y/n] ");
|
||||
let _ = std::io::stdout().flush();
|
||||
let mut answer = String::new();
|
||||
let _ = std::io::stdin().read_line(&mut answer);
|
||||
if answer.trim().to_ascii_lowercase().starts_with('n') {
|
||||
let _ = std::fs::create_dir_all(&to);
|
||||
let _ = std::fs::write(&declined, "asked once; `victory get-fsr` fetches them\r\n");
|
||||
println!("Not downloaded. `victory get-fsr` does it later; the title runs without frame generation.");
|
||||
} else if let Err(e) = fetch_fsr(&to) {
|
||||
println!("{e:#}");
|
||||
}
|
||||
}
|
||||
|
||||
/// `D3D12` beside this program: where Windows looks for Microsoft's newer
|
||||
/// Direct3D 12 runtime (main.rs's `D3D12SDKPath`).
|
||||
fn d3d12_dir() -> Result<PathBuf> {
|
||||
let program = std::env::current_exe().context("this program's own path")?;
|
||||
Ok(program.parent().map(Path::to_path_buf).unwrap_or_default().join("D3D12"))
|
||||
}
|
||||
|
||||
/// The highest shader model the default GPU runs, asked by a process of our
|
||||
/// own (`victory shader-model`: a process keeps the first Direct3D 12 runtime
|
||||
/// it loads, and this one is yet to choose). `None`: no answer.
|
||||
fn shader_model() -> Option<(u32, u32)> {
|
||||
let program = std::env::current_exe().ok()?;
|
||||
let out = std::process::Command::new(program)
|
||||
.arg("shader-model")
|
||||
.env_remove("VICTORY_LOG_FILE")
|
||||
.stdin(std::process::Stdio::null())
|
||||
.stderr(std::process::Stdio::null())
|
||||
.output()
|
||||
.ok()?;
|
||||
let text = String::from_utf8_lossy(&out.stdout);
|
||||
let (major, minor) = text.lines().rev().find_map(|l| l.trim().split_once('.'))?;
|
||||
Some((major.parse().ok()?, minor.parse().ok()?))
|
||||
}
|
||||
|
||||
/// Runs the fetcher: Microsoft's D3D12Core.dll from nuget.org into `to`.
|
||||
fn fetch_d3d12(to: &Path) -> Result<()> {
|
||||
std::fs::create_dir_all(to).with_context(|| format!("creating {} (beside victory.exe)", to.display()))?;
|
||||
let script = std::env::temp_dir().join(format!("victory-get-d3d12-{}.ps1", std::process::id()));
|
||||
std::fs::write(&script, FETCH_D3D12).with_context(|| format!("writing {}", script.display()))?;
|
||||
let status = std::process::Command::new("powershell.exe")
|
||||
.args(["-NoProfile", "-ExecutionPolicy", "Bypass", "-File"])
|
||||
.arg(&script)
|
||||
.arg("-To")
|
||||
.arg(to)
|
||||
.status()
|
||||
.context("starting Windows PowerShell")?;
|
||||
let _ = std::fs::remove_file(&script);
|
||||
anyhow::ensure!(
|
||||
status.success() && to.join("D3D12Core.dll").is_file(),
|
||||
"Microsoft's Direct3D 12 runtime did not arrive (see above)"
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `victory get-d3d12`.
|
||||
pub(crate) fn get_d3d12() -> Result<()> {
|
||||
fetch_d3d12(&d3d12_dir()?)
|
||||
}
|
||||
|
||||
/// Makes sure the GPU runs the translated shaders' model (6.6) before the
|
||||
/// title starts: where Windows' own Direct3D 12 does not (Windows 10),
|
||||
/// Microsoft's newer runtime is fetched beside this program, after asking.
|
||||
/// Below 6.6 every pipeline is refused and the title closes within seconds,
|
||||
/// so a start that still cannot run it stops here, saying why.
|
||||
fn check_shader_model() -> Result<()> {
|
||||
let needed = victory_hle::streamline::SHADER_MODEL_NEEDED;
|
||||
let Some(found) = shader_model() else { return Ok(()) };
|
||||
if found >= needed {
|
||||
return Ok(());
|
||||
}
|
||||
let to = d3d12_dir()?;
|
||||
let had = to.join("D3D12Core.dll").is_file();
|
||||
if !had {
|
||||
println!("This PC's Direct3D 12 runs shader model {}.{}, and the game's translated shaders need 6.6.", found.0, found.1);
|
||||
println!("Windows 10's own Direct3D 12 stops at 6.5; Microsoft's newer runtime (the D3D12 Agility SDK)");
|
||||
println!("runs 6.6. It is Microsoft's own, under Microsoft's licence, from nuget.org (about 22 MB, once),");
|
||||
println!("and goes into {}.", to.display());
|
||||
let yes = if std::io::stdin().is_terminal() {
|
||||
print!("Download it now? [Y/n] ");
|
||||
let _ = std::io::stdout().flush();
|
||||
let mut answer = String::new();
|
||||
let _ = std::io::stdin().read_line(&mut answer);
|
||||
!answer.trim().to_ascii_lowercase().starts_with('n')
|
||||
} else {
|
||||
true
|
||||
};
|
||||
if yes {
|
||||
match fetch_d3d12(&to) {
|
||||
Ok(()) => match shader_model() {
|
||||
Some(now) if now >= needed => {
|
||||
println!("Shader model {}.{} with Microsoft's runtime. Starting the game.", now.0, now.1);
|
||||
return Ok(());
|
||||
}
|
||||
now => {
|
||||
let now = now.unwrap_or(found);
|
||||
println!("With Microsoft's runtime the GPU still runs shader model {}.{}.", now.0, now.1);
|
||||
}
|
||||
},
|
||||
Err(e) => println!("{e:#}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
let now = shader_model().unwrap_or(found);
|
||||
anyhow::bail!(
|
||||
"this PC's Direct3D 12 runs shader model {}.{}, and the game needs 6.6: every shader would be \
|
||||
refused and the game would close at once. {}",
|
||||
now.0,
|
||||
now.1,
|
||||
if to.join("D3D12Core.dll").is_file() {
|
||||
"Microsoft's newer runtime is in place (D3D12 beside victory.exe), so it is the graphics \
|
||||
driver: update it, or use Windows 11"
|
||||
} else {
|
||||
"`victory get-d3d12` fetches Microsoft's newer runtime into D3D12 beside victory.exe; \
|
||||
or use Windows 11"
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/// DLLs beside this program under the names of Windows' own that it loads (a
|
||||
/// mod's proxy: MFG Unlocker as `winmm.dll` unlocks DLSS Frame Generation on
|
||||
/// RTX 20 and 30 cards), for the log: a report then says what else ran.
|
||||
fn mod_dlls(here: &Path) -> Vec<String> {
|
||||
const NAMES: [&str; 7] = ["winmm.dll", "version.dll", "dxgi.dll", "d3d12.dll", "xinput1_4.dll", "dinput8.dll", "winhttp.dll"];
|
||||
NAMES.iter().filter(|n| here.join(n).is_file()).map(|n| (*n).to_owned()).collect()
|
||||
}
|
||||
|
||||
/// How long the first start of a new victory.exe plays before it restarts.
|
||||
const WARMUP_SECONDS: u32 = 20;
|
||||
|
||||
/// The file that says this victory.exe (its bytes) had its warm-up start:
|
||||
/// `%LOCALAPPDATA%\victory\warmed\<hash>`. `None`: the exe could not be read.
|
||||
fn warmup_mark(home: &Path, program: &Path) -> Option<PathBuf> {
|
||||
let bytes = std::fs::read(program).ok()?;
|
||||
let hash = blake3::hash(&bytes).to_hex();
|
||||
Some(home.join("warmed").join(&hash.as_str()[..16]))
|
||||
}
|
||||
|
||||
/// What a start needs once its settings are in the environment.
|
||||
pub(crate) struct Ready {
|
||||
pub(crate) exe: PathBuf,
|
||||
@@ -416,6 +636,8 @@ pub(crate) fn prepare(o: &Play) -> Result<Ready> {
|
||||
// (Windows' own long form `\\?\C:\...` back to the plain one.)
|
||||
let exe = PathBuf::from(exe.to_string_lossy().trim_start_matches(r"\\?\").to_owned());
|
||||
|
||||
check_shader_model()?;
|
||||
|
||||
let home = home()?;
|
||||
std::fs::create_dir_all(&home).with_context(|| format!("creating {}", home.display()))?;
|
||||
let menu_file = home.join("victory-settings.txt");
|
||||
@@ -431,6 +653,32 @@ pub(crate) fn prepare(o: &Play) -> Result<Ready> {
|
||||
}
|
||||
let streamline = streamline_dir(&here);
|
||||
let (mut s, series_s) = settings(o, &menu, streamline.as_deref());
|
||||
// FSR 3 made ready: AMD's files, asked for only where they would be used (FSR 3 chosen,
|
||||
// or a card without DLSS Frame Generation).
|
||||
if s.contains_key("VICTORY_FSR_FRAMEGEN") {
|
||||
if fidelityfx_dir(&here).is_none() {
|
||||
let chosen = s.get("VICTORY_MENU_FG_TYPE").is_some_and(|t| t == "fsr");
|
||||
let card = victory_hle::streamline::adapter_name().unwrap_or_default();
|
||||
if chosen || !victory_hle::streamline::dlss_framegen_card(&card) {
|
||||
offer_fsr(if chosen { "" } else { &card });
|
||||
}
|
||||
}
|
||||
if let Some(dir) = fidelityfx_dir(&here) {
|
||||
s.insert("VICTORY_FIDELITYFX_DIR".to_owned(), dir.to_string_lossy().into_owned());
|
||||
}
|
||||
}
|
||||
// The first start of this victory.exe (no mark for its bytes yet): the game plays a little
|
||||
// and starts again by itself (crates\victory-gpu\src\host\menu.rs, `warmup`), since a new
|
||||
// exe's first run stays at about 14 fps. `--set VICTORY_WARMUP_RESTART=0`: not done.
|
||||
if !s.contains_key("VICTORY_WARMUP_RESTART")
|
||||
&& let Some(mark) = warmup_mark(&home, &program)
|
||||
&& !mark.exists()
|
||||
{
|
||||
println!("First start of this version of victory.exe: the game restarts by itself after {WARMUP_SECONDS} seconds,");
|
||||
println!("once (a new version's first run otherwise stays at about 14 fps).");
|
||||
s.insert("VICTORY_WARMUP_RESTART".to_owned(), WARMUP_SECONDS.to_string());
|
||||
s.insert("VICTORY_WARMUP_MARK".to_owned(), mark.to_string_lossy().into_owned());
|
||||
}
|
||||
// Where the menu saves, and how it starts the title again (`--set` is not carried over).
|
||||
let quoted = |p: &Path| format!("'{}'", p.to_string_lossy().replace('\'', "''"));
|
||||
s.insert("VICTORY_MENU_FILE".to_owned(), menu_file.to_string_lossy().into_owned());
|
||||
@@ -442,7 +690,14 @@ pub(crate) fn prepare(o: &Play) -> Result<Ready> {
|
||||
let log = log_file(&home.join("logs"))?;
|
||||
let console = if series_s { "series-s" } else { "series-x" };
|
||||
let line: Vec<String> = s.iter().map(|(k, v)| format!("{k}={v}")).collect();
|
||||
std::fs::write(&log, format!("# console={console} build=release switches: {}\n", line.join(" ")))
|
||||
let mods = mod_dlls(&here);
|
||||
let mods_line = if mods.is_empty() {
|
||||
String::new()
|
||||
} else {
|
||||
println!("Beside this program, loaded in its place by Windows: {} (a mod, e.g. MFG Unlocker).", mods.join(", "));
|
||||
format!("# beside victory.exe (mods, loaded instead of Windows' own): {}\n", mods.join(" "))
|
||||
};
|
||||
std::fs::write(&log, format!("# console={console} build=release switches: {}\n{mods_line}", line.join(" ")))
|
||||
.with_context(|| format!("writing {}", log.display()))?;
|
||||
println!("Log: {}", log.display());
|
||||
s.insert("VICTORY_LOG_FILE".to_owned(), log.to_string_lossy().into_owned());
|
||||
@@ -575,6 +830,15 @@ mod tests {
|
||||
assert_eq!((get("VICTORY_AMBIENT"), get("VICTORY_NEW")), (Some("0"), Some("2")));
|
||||
}
|
||||
|
||||
/// AMD's files are offered only to cards without DLSS Frame Generation (or FSR 3 chosen).
|
||||
#[test]
|
||||
fn cards_with_dlss_frame_generation() {
|
||||
use victory_hle::streamline::dlss_framegen_card as fg;
|
||||
assert!(fg("NVIDIA GeForce RTX 5070") && fg("NVIDIA GeForce RTX 4070 SUPER") && fg("NVIDIA GeForce RTX 5090 Laptop GPU"));
|
||||
assert!(!fg("NVIDIA GeForce RTX 3080 Ti") && !fg("NVIDIA GeForce RTX 2060") && !fg("NVIDIA GeForce GTX 1080"));
|
||||
assert!(!fg("AMD Radeon RX 7900 XTX") && !fg("Intel(R) Arc(TM) A770 Graphics") && !fg(""));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stamps_are_dates() {
|
||||
assert_eq!(stamp(0), "19700101-000000");
|
||||
|
||||
Reference in new issue
Block a user