From cb45bbac818b3e023b59014302c9950b7abcff7a Mon Sep 17 00:00:00 2001 From: cdozdil Date: Mon, 4 May 2026 16:52:14 +0300 Subject: [PATCH] Always search for DLSS files --- OptiScaler/dllmain.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/OptiScaler/dllmain.cpp b/OptiScaler/dllmain.cpp index a27bf851..e2ef12c8 100644 --- a/OptiScaler/dllmain.cpp +++ b/OptiScaler/dllmain.cpp @@ -1773,6 +1773,13 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv State::Instance().isRunningOnLinux = IsRunningOnWine(); State::Instance().isRunningOnDXVK = State::Instance().isRunningOnLinux; + spdlog::info(""); + spdlog::info("Check for DLSS files"); + auto exePath = Util::ExePath().remove_filename(); + State::Instance().NVNGX_DLSS_Path = Util::FindFilePath(exePath, "nvngx_dlss.dll"); + State::Instance().NVNGX_DLSSD_Path = Util::FindFilePath(exePath, "nvngx_dlssd.dll"); + State::Instance().NVNGX_DLSSG_Path = Util::FindFilePath(exePath, "nvngx_dlssg.dll"); + // Check if real DLSS available if (Config::Instance()->DLSSEnabled.value_or_default()) { @@ -1783,12 +1790,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv { spdlog::info("Running on Nvidia"); - // TODO: Upscaler inputs also get paths so make this code shared - auto exePath = Util::ExePath().remove_filename(); - State::Instance().NVNGX_DLSS_Path = Util::FindFilePath(exePath, "nvngx_dlss.dll"); - State::Instance().NVNGX_DLSSD_Path = Util::FindFilePath(exePath, "nvngx_dlssd.dll"); - State::Instance().NVNGX_DLSSG_Path = Util::FindFilePath(exePath, "nvngx_dlssg.dll"); - if (!State::Instance().NVNGX_DLSS_Path.has_value() && Config::Instance()->NVNGX_DLSS_Library.has_value()) {