don't unload resources shared between backgrounds when loading a new background
This commit is contained in:
@@ -341,7 +341,13 @@ retry:
|
|||||||
CString sNewBGA = THEME->GetPathToB(sScreenName+" background");
|
CString sNewBGA = THEME->GetPathToB(sScreenName+" background");
|
||||||
if( m_sLastLoadedBackground != sNewBGA )
|
if( m_sLastLoadedBackground != sNewBGA )
|
||||||
{
|
{
|
||||||
m_pSharedBGA->LoadFromAniDir( sNewBGA );
|
// Create the new background before deleting the previous so that we keep
|
||||||
|
// any common textures loaded.
|
||||||
|
BGAnimation *pNewBGA = new BGAnimation;
|
||||||
|
pNewBGA->LoadFromAniDir( sNewBGA );
|
||||||
|
SAFE_DELETE( m_pSharedBGA );
|
||||||
|
m_pSharedBGA = pNewBGA;
|
||||||
|
|
||||||
m_sLastLoadedBackground = sNewBGA;
|
m_sLastLoadedBackground = sNewBGA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user