(D3D9) Some cleanups

This commit is contained in:
twinaphex 2014-01-09 13:18:25 +01:00
parent e4b959a841
commit d07c3242cf

View File

@ -576,7 +576,9 @@ void D3DVideo::deinit(void)
{
deinit_font();
deinit_chain();
#ifdef HAVE_CG
deinit_cg();
#endif
needs_restore = false;
}
@ -789,13 +791,13 @@ bool D3DVideo::init_cg(void)
void D3DVideo::deinit_cg(void)
{
if (cgCtx)
{
cgD3D9UnloadAllPrograms();
cgD3D9SetDevice(NULL);
cgDestroyContext(cgCtx);
cgCtx = NULL;
}
if (!cgCtx)
return;
cgD3D9UnloadAllPrograms();
cgD3D9SetDevice(NULL);
cgDestroyContext(cgCtx);
cgCtx = NULL;
}
#endif