Skip to content

Commit d021bff

Browse files
committed
fix custom nvngx_dlss
fix dlss (remove nvngx_dlss from upscaler lisy)
1 parent 80f2f6b commit d021bff

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

OptiScaler/OptiScaler.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<IncludePath>$(SolutionDir)external\vulkan\include;$(SolutionDir)external\nvngx_dlss_sdk;$(SolutionDir)external\xess\inc\xess;$(SolutionDir)external\FidelityFX-SDK\ffx-api\include\ffx_api;$(SolutionDir)external\simpleini;$(SolutionDir)external\unordered_dense\include;$(SolutionDir)external\spdlog\include;$(IncludePath)</IncludePath>
8383
<LibraryPath>$(ProjectDir)fsr2\lib;$(ProjectDir)fsr2_212\lib;$(ProjectDir)fsr31\lib;$(ProjectDir)vulkan;$(ProjectDir)d3dx;$(ProjectDir)detours;$(SolutionDir)external\xess\lib;$(LibraryPath)</LibraryPath>
8484
<TargetName>dxgi</TargetName>
85-
<OutDir>D:\Folders\Games\SteamLibrary\steamapps\common\DEATH STRANDING DIRECTORS CUT\</OutDir>
85+
<OutDir>D:\Folders\Games\Banishers Ghosts of New Eden\NWD\Binaries\Win64\</OutDir>
8686
<IntDir>.\x64\Debug</IntDir>
8787
</PropertyGroup>
8888
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

OptiScaler/dllmain.cpp

+31-3
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,16 @@ inline std::vector<std::string> upscalerNames =
5252
{
5353
"nvngx.dll",
5454
"nvngx",
55-
"nvngx_dlss.dll",
56-
"nvngx_dlss",
5755
"libxess.dll",
5856
"libxess"
5957
};
6058

59+
inline std::vector<std::string> nvngxDlss =
60+
{
61+
"nvngx_dlss.dll",
62+
"nvngx_dlss",
63+
};
64+
6165
inline std::vector<std::string> nvapiNames =
6266
{
6367
"nvapi64.dll",
@@ -70,8 +74,14 @@ inline std::vector<std::wstring> upscalerNamesW =
7074
{
7175
L"nvngx.dll",
7276
L"nvngx",
77+
L"libxess.dll",
78+
L"libxess"
79+
};
80+
81+
inline std::vector<std::wstring> nvngxDlssW =
82+
{
7383
L"nvngx_dlss.dll",
74-
L"nvngx_dlss"
84+
L"nvngx_dlss",
7585
};
7686

7787
inline std::vector<std::wstring> nvapiNamesW =
@@ -160,6 +170,15 @@ inline static HMODULE LoadLibraryCheck(std::string lcaseLibName)
160170
return nvapi;
161171
}
162172

173+
// nvngx_dlss
174+
if (Config::Instance()->DLSSEnabled.value_or(true) && Config::Instance()->DLSSLibrary.has_value() && CheckDllName(&lcaseLibName, &nvngxDlss))
175+
{
176+
auto nvngxDlss = LoadNvgxDlss(string_to_wstring(lcaseLibName));
177+
178+
if (nvngxDlss != nullptr)
179+
return nvngxDlss;
180+
}
181+
163182
if (!isNvngxMode && CheckDllName(&lcaseLibName, &dllNames))
164183
{
165184
LOG_INFO("{0} call returning this dll!", lcaseLibName);
@@ -200,6 +219,15 @@ inline static HMODULE LoadLibraryCheckW(std::wstring lcaseLibName)
200219
}
201220
}
202221

222+
// nvngx_dlss
223+
if (Config::Instance()->DLSSEnabled.value_or(true) && Config::Instance()->DLSSLibrary.has_value() && CheckDllNameW(&lcaseLibName, &nvngxDlssW))
224+
{
225+
auto nvngxDlss = LoadNvgxDlss(lcaseLibName);
226+
227+
if (nvngxDlss != nullptr)
228+
return nvngxDlss;
229+
}
230+
203231
// NvApi64.dll
204232
if (!isWorkingWithEnabler && Config::Instance()->OverrideNvapiDll.value_or(false) && CheckDllNameW(&lcaseLibName, &nvapiNamesW))
205233
{

0 commit comments

Comments
 (0)