unload BGA for screens that don't have a background
This commit is contained in:
@@ -355,10 +355,15 @@ retry:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load shared BGAnimation
|
// Load shared BGAnimation
|
||||||
|
CString sNewBGA;
|
||||||
if( pNewScreen->UsesBackground() )
|
if( pNewScreen->UsesBackground() )
|
||||||
|
sNewBGA = THEME->GetPathToB(sScreenName+" background");
|
||||||
|
if( sNewBGA.empty() )
|
||||||
{
|
{
|
||||||
CString sNewBGA = THEME->GetPathToB(sScreenName+" background");
|
m_pSharedBGA->Unload();
|
||||||
if( m_sLastLoadedBackground != sNewBGA )
|
m_sLastLoadedBackground = "";
|
||||||
|
}
|
||||||
|
else if( m_sLastLoadedBackground != sNewBGA )
|
||||||
{
|
{
|
||||||
// Create the new background before deleting the previous so that we keep
|
// Create the new background before deleting the previous so that we keep
|
||||||
// any common textures loaded.
|
// any common textures loaded.
|
||||||
@@ -369,7 +374,6 @@ retry:
|
|||||||
|
|
||||||
m_sLastLoadedBackground = sNewBGA;
|
m_sLastLoadedBackground = sNewBGA;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool bWasOnSystemMenu = GAMESTATE->m_bIsOnSystemMenu;
|
bool bWasOnSystemMenu = GAMESTATE->m_bIsOnSystemMenu;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user