Fix NVSDK Scoped init class

This commit is contained in:
cdozdil
2026-05-04 17:52:00 +02:00
committed by FakeMichau
parent 7f097beb63
commit 7079bb0e67
3 changed files with 10 additions and 9 deletions
+3 -3
View File
@@ -22,18 +22,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
@@ -33,18 +33,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
@@ -28,18 +28,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(