aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrong <[email protected]>2018-05-25 16:08:37 +0800
committerbrong <[email protected]>2018-05-25 18:15:02 +0800
commitdfe2eda1ab4dd156fc904b8fae8a86ec3ff917a9 (patch)
tree634bcfa0203862e5ac6d2b81aae645622b736af2
parentNo longer find delay loaded GfeSDK.dll from hard-coded directory. (diff)
downloadgfesdk-ue4plugin-4.19.tar.xz
gfesdk-ue4plugin-4.19.zip
Make non-first-time InitHighlights BP node output the same GfeSdkProperties as the first time, instead of undefined GfeSdkProperties.4.19
-rw-r--r--Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp7
-rw-r--r--Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp
index 8464b9b..ca129ce 100644
--- a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp
+++ b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp
@@ -197,6 +197,9 @@ EGfeSDKReturnCode FNVIDIAGfeSDK::Create(FGfeSDKCreateInputParams const& InputPar
TranslateEnum(kScopeSdkToUnreal, OutputParamsCreate.scopePermissionTable[i].scope, EGfeSDKScope::MAX),
TranslateEnum(kPermissionSdkToUnreal, OutputParamsCreate.scopePermissionTable[i].permission, EGfeSDKPermission::MAX));
}
+
+ // Save it for future when GFEHandle exists.
+ SdkResponseRecord = Response;
}
else
{
@@ -209,6 +212,9 @@ EGfeSDKReturnCode FNVIDIAGfeSDK::Create(FGfeSDKCreateInputParams const& InputPar
}
else
{
+ // Use saved value.
+ Response = SdkResponseRecord;
+
return TranslateReturnCodeToUnreal(GfeSDK::NVGSDK_RetCode::NVGSDK_SUCCESS);
}
@@ -220,6 +226,7 @@ void FNVIDIAGfeSDK::Release()
{
NVGSDK_Release(GFEHandle);
GFEHandle = nullptr;
+ SdkResponseRecord = FGfeSDKCreateResponse();
}
SdkHighlights.Reset();
}
diff --git a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.h b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.h
index f021576..8bf9a97 100644
--- a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.h
+++ b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.h
@@ -43,4 +43,5 @@ private:
TUniquePtr<FGfeSDKCore> SdkCore;
// SDK handle for C interface
GfeSDK::NVGSDK_HANDLE* GFEHandle;
+ FGfeSDKCreateResponse SdkResponseRecord;
};