fix background caching
This commit is contained in:
@@ -729,6 +729,7 @@ void ScreenSelectMusic::CheckBackgroundRequests()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
CString sPath;
|
CString sPath;
|
||||||
|
bool bFreeCache = false;
|
||||||
if( TEXTUREMAN->IsTextureRegistered( Sprite::SongBannerTexture(g_sBannerPath) ) )
|
if( TEXTUREMAN->IsTextureRegistered( Sprite::SongBannerTexture(g_sBannerPath) ) )
|
||||||
{
|
{
|
||||||
/* If the file is already loaded into a texture, it's finished,
|
/* If the file is already loaded into a texture, it's finished,
|
||||||
@@ -739,11 +740,14 @@ void ScreenSelectMusic::CheckBackgroundRequests()
|
|||||||
{
|
{
|
||||||
if( !m_BackgroundLoader.IsCacheFileFinished( g_sBannerPath, sPath ) )
|
if( !m_BackgroundLoader.IsCacheFileFinished( g_sBannerPath, sPath ) )
|
||||||
return;
|
return;
|
||||||
m_BackgroundLoader.FinishedWithCachedFile( g_sBannerPath );
|
bFreeCache = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_bBannerWaiting = false;
|
g_bBannerWaiting = false;
|
||||||
m_Banner.Load( sPath );
|
m_Banner.Load( sPath );
|
||||||
|
|
||||||
|
if( bFreeCache )
|
||||||
|
m_BackgroundLoader.FinishedWithCachedFile( g_sBannerPath );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Nothing else is going. Start the music, if we havn't yet. */
|
/* Nothing else is going. Start the music, if we havn't yet. */
|
||||||
|
|||||||
Reference in New Issue
Block a user