diff --git a/FSR3UnityPlugin.cpp b/FSR3UnityPlugin.cpp index df16636..1c01061 100644 --- a/FSR3UnityPlugin.cpp +++ b/FSR3UnityPlugin.cpp @@ -251,7 +251,7 @@ extern "C" bool UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API AMDUP_InitApi() ffxFsr2GetInterfaceDX11(&s_Fsr2Interface, device, scratchBuffer, scratchBufferSize); return true; } - if (s_GraphicsD3D12 != nullptr) + else if (s_GraphicsD3D12 != nullptr) { ID3D12Device* device = s_GraphicsD3D12->GetDevice(); if (device == nullptr) @@ -665,7 +665,7 @@ static void UNITY_INTERFACE_API OnSetTextureEvent(int eventID, void* data) { textureDesc->image = (intptr_t)s_GraphicsD3D11->TextureFromNativeTexture((UnityTextureID)params->textureID); } - if (s_GraphicsD3D12 != nullptr) + else if (s_GraphicsD3D12 != nullptr) { textureDesc->image = (intptr_t)s_GraphicsD3D12->TextureFromNativeTexture((UnityTextureID)params->textureID); }