fix texture leak.

D3D has the best response to these reference leaks ever: on shutdown, some
part of window closing or screen mode resetting will freeze for about five seconds,
depending on the window mode.  No indication why is given.
This commit is contained in:
Glenn Maynard
2005-11-05 16:48:35 +00:00
parent 36b7ba7d0c
commit 3f5a42adc6
+4 -3
View File
@@ -795,10 +795,11 @@ void RageDisplay_D3D::SendCurrentMatrices()
g_pd3dDevice->SetTextureStageState( tu, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 ); g_pd3dDevice->SetTextureStageState( tu, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 );
// If no texture is set for this texture unit, don't bother setting it up. // If no texture is set for this texture unit, don't bother setting it up.
IDirect3DBaseTexture8* ppTexture = NULL; IDirect3DBaseTexture8* pTexture = NULL;
g_pd3dDevice->GetTexture( g_currentTextureUnit, &ppTexture ); g_pd3dDevice->GetTexture( g_currentTextureUnit, &pTexture );
if( ppTexture == NULL ) if( pTexture == NULL )
continue; continue;
pTexture->Release();
if( g_bSphereMapping[tu] ) if( g_bSphereMapping[tu] )