From c4f5a0aff93e05b3c01de0dbdc7c05e5d9530eda Mon Sep 17 00:00:00 2001 From: Igor Govorov Date: Wed, 11 Apr 2018 18:28:51 +0300 Subject: Push GeForceExperience SDK 1.1.201 --- samples/DX_APIUsage/GfeSDKWrapper.hpp | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 samples/DX_APIUsage/GfeSDKWrapper.hpp (limited to 'samples/DX_APIUsage/GfeSDKWrapper.hpp') diff --git a/samples/DX_APIUsage/GfeSDKWrapper.hpp b/samples/DX_APIUsage/GfeSDKWrapper.hpp new file mode 100644 index 0000000..c9c50f2 --- /dev/null +++ b/samples/DX_APIUsage/GfeSDKWrapper.hpp @@ -0,0 +1,61 @@ +/* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +* +* NVIDIA CORPORATION and its licensors retain all intellectual property +* and proprietary rights in and to this software, related documentation +* and any modifications thereto. Any use, reproduction, disclosure or +* distribution of this software and related documentation without an express +* license agreement from NVIDIA CORPORATION is strictly prohibited. +*/ + +#pragma once + +#include +#include +#include + +#include +#include + +namespace Json +{ +class Value; +} + +class GfeSdkWrapper +{ +public: + GfeSdkWrapper(); + + void Init(char const* gameName, char const* defaultLocale, GfeSDK::NVGSDK_Highlight* highlights, size_t numHighlights); + void DeInit(); + void OnTick(void); + void OnNotification(GfeSDK::NVGSDK_NotificationType type, GfeSDK::NotificationBase const&); + void OnOpenGroup(std::string const& id); + void OnCloseGroup(std::string const& id, bool destroy = false); + void OnSaveScreenshot(std::string const& highlightId, std::string const& groupId); + void OnSaveVideo(std::string const& highlightId, std::string const& groupId, int startDelta, int endDelta); + void OnGetNumHighlights(std::string const& groupId, GfeSDK::NVGSDK_HighlightSignificance sigFilter, GfeSDK::NVGSDK_HighlightType tagFilter); + void OnOpenSummary(char const* groupIds[], size_t numGroups, GfeSDK::NVGSDK_HighlightSignificance sigFilter, GfeSDK::NVGSDK_HighlightType tagFilter); + void OnRequestLanguage(void); + void OnRequestUserSettings(void); + + wchar_t const* GetCurrentPermissionStr(void); + wchar_t const* GetLastOverlayEvent(void); + wchar_t const* GetLastResult(void); + wchar_t const* GetLastQueryResult(void); + +private: + void ConfigureHighlights(char const* defaultLocale, GfeSDK::NVGSDK_Highlight* highlights, size_t numHighlights); + void UpdateLastResultString(GfeSDK::NVGSDK_RetCode rc); + + std::unique_ptr m_gfesdk; + std::unique_ptr m_highlights; + + std::wstring_convert> m_converter; + std::wstring m_currentPermission; + std::wstring m_lastOverlayEvent; + std::wstring m_lastResult; + std::wstring m_lastQueryResult; +}; + +inline void InitGfeSdkWrapper(GfeSdkWrapper* hl) {} -- cgit v1.2.3