Browse Source

Avoid double initialization of the upscaler singleton. The graphics initialization event might get called multiple times.

master
Nico de Poel 10 months ago
parent
commit
39f537d9b0
  1. 6
      src/FSR3UnityPlugin.cpp

6
src/FSR3UnityPlugin.cpp

@ -48,6 +48,12 @@ static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType ev
{
case kUnityGfxDeviceEventInitialize:
{
if (s_Upscaler != nullptr)
{
// Avoid double initialization
break;
}
s_RendererType = s_Graphics->GetRenderer();
switch (s_RendererType)
{

Loading…
Cancel
Save