aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrong <[email protected]>2018-05-25 16:08:37 +0800
committerbrong <[email protected]>2018-05-25 16:08:37 +0800
commit1e8fa2d9af2348003db36ad965a135ddfd4ac018 (patch)
treeb10959a57022837fc827a68d17f6e038b6b7122a
parentFixed errors related to new struct fields in the new SDK version (diff)
downloadgfesdk-ue4plugin-4.13.tar.xz
gfesdk-ue4plugin-4.13.zip
Make non-first-time InitHighlights BP node output the same GfeSdkProperties as the first time, instead of undefined GfeSdkProperties.4.13
-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 faafa47..5293b69 100644
--- a/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp
+++ b/Source/NVIDIAGfeSDK/Private/FNVIDIAGfeSDK.cpp
@@ -198,6 +198,9 @@ EGfeSDKReturnCode FNVIDIAGfeSDK::Create(FGfeSDKCreateInputParams const& InputPar
TranslateEnum(kPermissionSdkToUnreal, OutputParamsCreate.scopePermissionTable[i].permission, EGfeSDKPermission::MAX)
));
}
+
+ // Save it for future when GFEHandle exists.
+ SdkResponseRecord = Response;
}
else
{
@@ -210,6 +213,9 @@ EGfeSDKReturnCode FNVIDIAGfeSDK::Create(FGfeSDKCreateInputParams const& InputPar
}
else
{
+ // Use saved value.
+ Response = SdkResponseRecord;
+
return TranslateReturnCodeToUnreal(GfeSDK::NVGSDK_RetCode::NVGSDK_SUCCESS);
}
@@ -221,6 +227,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;
};