Fix NVSDK Scoped init class

This commit is contained in:
cdozdil
2026-05-04 16:53:26 +03:00
parent cb45bbac81
commit fa553dd8f8
3 changed files with 10 additions and 9 deletions
+3 -3
View File
@@ -20,18 +20,18 @@ static inline int evalCounter = 0;
static inline bool shutdown = false;
static inline bool _skipInit = false;
class ScopedInit
class ScopedInitDx11
{
private:
bool previousState;
public:
ScopedInit()
ScopedInitDx11()
{
previousState = _skipInit;
_skipInit = true;
}
~ScopedInit() { _skipInit = previousState; }
~ScopedInitDx11() { _skipInit = previousState; }
};
#pragma region NVSDK_NGX_D3D11_Init
+4 -3
View File
@@ -30,18 +30,19 @@ static std::wstring appDataPath = L".";
static bool shutdown = false;
static inline bool _skipInit = false;
class ScopedInit
class ScopedInitDx12
{
private:
bool previousState;
public:
ScopedInit()
ScopedInitDx12()
{
previousState = _skipInit;
_skipInit = true;
}
~ScopedInit() { _skipInit = previousState; }
~ScopedInitDx12() { _skipInit = previousState; }
};
#pragma region DLSS Init Calls
+3 -3
View File
@@ -26,18 +26,18 @@ static inline int evalCounter = 0;
static inline bool shutdown = false;
static inline bool _skipInit = false;
class ScopedInit
class ScopedInitVk
{
private:
bool previousState;
public:
ScopedInit()
ScopedInitVk()
{
previousState = _skipInit;
_skipInit = true;
}
~ScopedInit() { _skipInit = previousState; }
~ScopedInitVk() { _skipInit = previousState; }
};
NVSDK_NGX_API NVSDK_NGX_Result NVSDK_NGX_VULKAN_Init_Ext2(