diff --git a/OptiScaler/Util.cpp b/OptiScaler/Util.cpp index cebd5af6..29a190a2 100644 --- a/OptiScaler/Util.cpp +++ b/OptiScaler/Util.cpp @@ -366,7 +366,8 @@ std::optional Util::FindFilePath(const std::filesystem::p const std::filesystem::path& fileName) { std::filesystem::path optiPath(Config::Instance()->MainDllPath.value()); - auto normalizedOptiPath = optiPath.lexically_normal(); + optiPath /= L"streamline"; + auto normalizedStreamlinePath = optiPath.lexically_normal(); const bool isDlssgOutput = State::Instance().activeFgOutput == FGOutput::DLSSG || State::Instance().activeFgOutput == FGOutput::DLSSGWithNvngx; @@ -386,7 +387,7 @@ std::optional Util::FindFilePath(const std::filesystem::p if (!entry.is_directory() && entry.path().filename() == fileName) { auto normalizedPath = entry.path().lexically_normal(); - if (isDlssgOutput || !IsSubpath(normalizedPath, normalizedOptiPath)) + if (isDlssgOutput || !IsSubpath(normalizedPath, normalizedStreamlinePath)) { LOG_INFO(L"{} found at {}", fileName.wstring(), entry.path().parent_path().wstring()); return entry.path(); @@ -414,7 +415,7 @@ std::optional Util::FindFilePath(const std::filesystem::p if (!entry.is_directory() && entry.path().filename() == fileName) { auto normalizedPath = entry.path().lexically_normal(); - if (isDlssgOutput || !IsSubpath(normalizedPath, normalizedOptiPath)) + if (isDlssgOutput || !IsSubpath(normalizedPath, normalizedStreamlinePath)) { LOG_INFO(L"{} found at {}", fileName.wstring(), entry.path().parent_path().wstring()); return entry.path(); diff --git a/OptiScaler/dllmain.cpp b/OptiScaler/dllmain.cpp index 5c809e6c..7985c38a 100644 --- a/OptiScaler/dllmain.cpp +++ b/OptiScaler/dllmain.cpp @@ -1819,7 +1819,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv if (!State::Instance().NVNGX_DLSS_Path.has_value() && Config::Instance()->MainDllPath.has_value()) { std::filesystem::path dllsFolder(Config::Instance()->MainDllPath.value()); - State::Instance().NVNGX_DLSS_Path = Util::FindFilePath(dllsFolder.remove_filename(), "nvngx_dlss.dll"); + State::Instance().NVNGX_DLSS_Path = Util::FindFilePath(dllsFolder, "nvngx_dlss.dll"); } if (State::Instance().NVNGX_DLSS_Path.has_value())