From 30e2fbf0e01cbf062b407ad1895d72dc3fef113d Mon Sep 17 00:00:00 2001 From: cdozdil Date: Sat, 11 Apr 2026 22:13:21 +0300 Subject: [PATCH] Fix for DLSS not working issue --- OptiScaler/proxies/NVNGX_Proxy.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/OptiScaler/proxies/NVNGX_Proxy.h b/OptiScaler/proxies/NVNGX_Proxy.h index 0eed3188..efb913a2 100644 --- a/OptiScaler/proxies/NVNGX_Proxy.h +++ b/OptiScaler/proxies/NVNGX_Proxy.h @@ -428,12 +428,14 @@ class NVNGXProxy LOG_INFO(""); + ScopedSkipDxgiLoadChecks scopedSkipDxgiLoadChecks {}; + if (nvngxModule != nullptr && _module.dll == nullptr) { _module.dll = nvngxModule; } - std::vector dllNames = { L"nvngx.dll", L"_nvngx.dll" }; + std::vector dllNames = { L"_nvngx.dll", L"nvngx.dll" }; auto optiPath = Config::Instance()->MainDllPath.value(); auto overridePath = Config::Instance()->NvngxPath.value_or(L""); @@ -459,10 +461,7 @@ class NVNGXProxy auto regNGXCorePath = Util::NvngxPath(); if (regNGXCorePath.has_value()) { - if (regNGXCorePath.value().has_filename()) - overridePath = regNGXCorePath.value().parent_path(); - else - overridePath = regNGXCorePath.value(); + overridePath = regNGXCorePath.value(); for (size_t i = 0; i < dllNames.size(); i++) { @@ -488,8 +487,10 @@ class NVNGXProxy LOG_INFO("Loaded from {}", wstring_to_string(_module.filePath)); } - if (_module.dll != nullptr && _module.D3D11_CreateFeature == nullptr) + if (_module.dll != nullptr && _module.D3D12_Init_ProjectID == nullptr) { + LOG_INFO("Getting nvngx method addresses"); + HookNgxApi(_module.dll); _module.D3D11_Init = @@ -602,8 +603,6 @@ class NVNGXProxy _module.UpdateFeature = (PFN_UpdateFeature) KernelBaseProxy::GetProcAddress_()(_module.dll, "NVSDK_NGX_UpdateFeature"); } - - LOG_INFO("getting nvngx method addresses"); } static void GetFeatureCommonInfo(NVSDK_NGX_FeatureCommonInfo* fcInfo)