File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,20 @@ void CEngineAPI::InitializeRenderers()
122122 // ask current renderer to setup GlobalEnv
123123 R_ASSERT2 (GEnv.SetupCurrentRenderer , " Can't setup renderer" );
124124 GEnv.SetupCurrentRenderer ();
125+
126+ // Now unload unused renderers
127+ // XXX: Unloading disabled due to typeids invalidation
128+ /* if (GEnv.CurrentRenderer != 4)
129+ hRenderR4->close();
130+
131+ if (GEnv.CurrentRenderer != 3)
132+ hRenderR3->close();
133+
134+ if (GEnv.CurrentRenderer != 2)
135+ hRenderR2->close();
136+
137+ if (GEnv.CurrentRenderer != 1)
138+ hRenderR1->close();*/
125139}
126140
127141void CEngineAPI::Initialize (void )
@@ -160,12 +174,12 @@ void CEngineAPI::Initialize(void)
160174
161175void CEngineAPI::Destroy (void )
162176{
163- if ( hGame) hGame-> close () ;
164- if ( hTuner) hTuner-> close () ;
165- if ( hRenderR1) hRenderR1-> close () ;
166- if ( hRenderR2) hRenderR2-> close () ;
167- if ( hRenderR3) hRenderR3-> close () ;
168- if ( hRenderR4) hRenderR4-> close () ;
177+ hGame = nullptr ;
178+ hTuner = nullptr ;
179+ hRenderR1 = nullptr ;
180+ hRenderR2 = nullptr ;
181+ hRenderR3 = nullptr ;
182+ hRenderR4 = nullptr ;
169183 pCreate = nullptr ;
170184 pDestroy = nullptr ;
171185 Engine.Event ._destroy ();
You can’t perform that action at this time.
0 commit comments