mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement CDXUTDialogResourceManager::OnDestroyDevice()
This commit is contained in:
parent
d639d50d1e
commit
38a476378e
@ -59,6 +59,31 @@ void CDXUTDialogResourceManager::OnLostDevice()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
void CDXUTDialogResourceManager::OnDestroyDevice()
|
||||
{
|
||||
int i=0;
|
||||
|
||||
//m_pd3dDevice = NULL;
|
||||
|
||||
// Release the resources but don't clear the cache, as these will need to be
|
||||
// recreated if the device is recreated
|
||||
for( i=0; i < m_FontCache.GetSize(); i++ )
|
||||
{
|
||||
DXUTFontNode* pFontNode = m_FontCache.GetAt( i );
|
||||
SAFE_RELEASE( pFontNode->pFont );
|
||||
}
|
||||
|
||||
for( i=0; i < m_TextureCache.GetSize(); i++ )
|
||||
{
|
||||
DXUTTextureNode* pTextureNode = m_TextureCache.GetAt( i );
|
||||
SAFE_RELEASE( pTextureNode->pTexture );
|
||||
}
|
||||
|
||||
SAFE_RELEASE( m_pSprite );
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
void DXUTBlendColor::Init( D3DCOLOR defaultColor, D3DCOLOR disabledColor, D3DCOLOR hiddenColor )
|
||||
{
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
|
||||
HRESULT OnResetDevice();
|
||||
void OnLostDevice();
|
||||
void OnDestroyDevice();
|
||||
|
||||
// Shared between all dialogs
|
||||
IDirect3DStateBlock9* m_pStateBlock;
|
||||
|
Loading…
Reference in New Issue
Block a user