MFG Unlocker as an F1 option: downloaded and loaded at start when on

F1, MFG UNLOCKER (MOD, RTX 20/30), off by default. When it is on, the
launcher fetches MFG Unlocker v1.7.2 from its author's GitHub release
into %LOCALAPPDATA%\victory\mfg-unlocker. The zip and MFGUnlocker.dll
are both checked against the SHA-256 the author published
(scripts\get-mfg-unlocker.ps1). victory.exe then loads the DLL under
its own name before the device is made or Streamline is loaded, so
nothing is renamed or put beside the game.

- RTX 20 and 30 cards with DLSS on are asked once at the first start
  (default No), unless the choice was made or a mod DLL is already
  beside victory.exe.
- `victory get-mfg` fetches it by hand.
- The menu explains the item while it is picked.
- The log records the load.
- README updated.

The download and the mod itself are not tested here (RTX 50 only). The
load path was tested with a Windows DLL in its place: loaded before
Streamline, game ran normally.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
trustno1-coderandClaude Opus 5.5 committed 2026-11-27 10:59:16 -08:00
1 parent 10862a6d87
commit 0cef07e9d7
6 files changed
+268 -9

No files matched your search

+21
View File
@@ -711,6 +711,27 @@ pub fn d3d12_core_path() -> Option<PathBuf> {
}
}
/// Loads a mod's DLL into this process for good, logged as `what` (MFG Unlocker: it wraps
/// NVIDIA's frame generation, so it is loaded before a device is made or Streamline loaded).
/// `Err`: Windows' error code.
pub fn load_mod(what: &str, path: &Path) -> Result<(), u32> {
use windows_sys::Win32::Foundation::GetLastError;
use windows_sys::Win32::System::LibraryLoader::LoadLibraryW;
let name = wide(path);
// SAFETY: a NUL-terminated path; the module stays loaded for the life of the process.
let (module, code) = unsafe {
let module = LoadLibraryW(name.as_ptr());
(module, if module.is_null() { GetLastError() } else { 0 })
};
if module.is_null() {
tracing::warn!(dll = %path.display(), code, "{what}: did not load");
Err(code)
} else {
tracing::info!(dll = %path.display(), "{what}: loaded");
Ok(())
}
}
/// The Authenticode signature of `path` (NVIDIA signs its DLLs), checked
/// without going online.
fn verify_signature(path: &Path) -> Result<(), String> {