fix background caching

This commit is contained in:
Glenn Maynard
2005-04-23 06:19:36 +00:00
parent 81adc42e5a
commit a8803f9777
+5 -1
View File
@@ -729,6 +729,7 @@ void ScreenSelectMusic::CheckBackgroundRequests()
return;
CString sPath;
bool bFreeCache = false;
if( TEXTUREMAN->IsTextureRegistered( Sprite::SongBannerTexture(g_sBannerPath) ) )
{
/* 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 ) )
return;
m_BackgroundLoader.FinishedWithCachedFile( g_sBannerPath );
bFreeCache = true;
}
g_bBannerWaiting = false;
m_Banner.Load( sPath );
if( bFreeCache )
m_BackgroundLoader.FinishedWithCachedFile( g_sBannerPath );
}
/* Nothing else is going. Start the music, if we havn't yet. */