From aa2eca3a1ca2c7b44de326b0fb34ccabf4ac05f5 Mon Sep 17 00:00:00 2001 From: brong Date: Thu, 17 May 2018 17:41:27 +0800 Subject: No longer find delay loaded GfeSDK.dll from hard-coded directory. --- Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp') diff --git a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp index 5566ab7..8464b9b 100644 --- a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp +++ b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp @@ -10,6 +10,7 @@ #include "NVIDIAGfeSDKPrivatePCH.h" #include "Runtime/Core/Public/Misc/Paths.h" #include "Runtime/Core/Public/Windows/WindowsPlatformProcess.h" +#include "IPluginManager.h" #include "gfesdk/sdk_types.h" @@ -49,9 +50,9 @@ void FNVIDIAGfeSDK::StartupModule() #endif // PLATFORM_WINDOWS // Get the base directory of this plugin - const FString PluginPath = FString(FPaths::EnginePluginsDir()); + const FString PluginPath = IPluginManager::Get().FindPlugin(TEXT("NVIDIAGfeSDK"))->GetBaseDir(); - FString RootDllPath = PluginPath / FString::Printf(TEXT("Runtime/NVIDIA/GfeSDK/ThirdParty/NVIDIAGfeSDK/redist/")) / WinDir; + FString RootDllPath = PluginPath / FString::Printf(TEXT("ThirdParty/NVIDIAGfeSDK/redist/")) / WinDir; FPlatformProcess::PushDllDirectory(*RootDllPath); LibHandle = FPlatformProcess::GetDllHandle(*(RootDllPath + "GfeSDK.dll")); -- cgit v1.2.3