aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrong <[email protected]>2018-05-17 17:41:27 +0800
committerbrong <[email protected]>2018-05-17 17:41:27 +0800
commit67a5c6362c363f1997bbcae4adc9fde1d3e72ee3 (patch)
treedf25bf315df35a06c0af1dd7e87fbf22028c64ca
parentCode of 4.18 plugin adapted to previously unsupported UE 4.13 (diff)
downloadgfesdk-ue4plugin-67a5c6362c363f1997bbcae4adc9fde1d3e72ee3.tar.xz
gfesdk-ue4plugin-67a5c6362c363f1997bbcae4adc9fde1d3e72ee3.zip
No longer find delay loaded GfeSDK.dll from hard-coded directory.
-rw-r--r--Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs1
-rw-r--r--Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs b/Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs
index ae3fb29..344592b 100644
--- a/Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs
+++ b/Source/NVIDIAGfeSDK/NVIDIAGfeSDK.Build.cs
@@ -52,6 +52,7 @@ namespace UnrealBuildTool.Rules
{
"Engine",
"Core",
+ "Projects",
"CoreUObject"
}
);
diff --git a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp
index 5e13b4c..ff880a2 100644
--- a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp
+++ b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp
@@ -10,6 +10,7 @@
#include "FNVIDIAGfeSDK.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"));