Fix some dll finding issues

Only skip dlls that are inside our streamline folder
This commit is contained in:
FakeMichau
2026-05-04 21:56:24 +02:00
parent 9972b08215
commit df2af62349
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -366,7 +366,8 @@ std::optional<std::filesystem::path> 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<std::filesystem::path> 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<std::filesystem::path> 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();
+1 -1
View File
@@ -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())