obey FastLoad

This commit is contained in:
Glenn Maynard
2005-08-30 19:48:46 +00:00
parent 1c655caadd
commit 44017dabdf
+8 -2
View File
@@ -339,11 +339,17 @@ void BannerCache::CacheBanner( CString BannerPath )
/* Check the full file hash. If it's the loaded and identical, don't recache. */ /* Check the full file hash. If it's the loaded and identical, don't recache. */
if( DoesFileExist(CachePath) ) if( DoesFileExist(CachePath) )
{
bool bCacheUpToDate = PREFSMAN->m_bFastLoad;
if( !bCacheUpToDate )
{ {
unsigned CurFullHash; unsigned CurFullHash;
const unsigned FullHash = GetHashForFile( BannerPath ); const unsigned FullHash = GetHashForFile( BannerPath );
if( BannerData.GetValue( BannerPath, "FullHash", CurFullHash ) && if( BannerData.GetValue( BannerPath, "FullHash", CurFullHash ) && CurFullHash == FullHash )
CurFullHash == FullHash ) bCacheUpToDate = true;
}
if( bCacheUpToDate )
{ {
/* It's identical. Just load it, if in preload. */ /* It's identical. Just load it, if in preload. */
if( PREFSMAN->m_BannerCache == PrefsManager::BNCACHE_LOW_RES_PRELOAD ) if( PREFSMAN->m_BannerCache == PrefsManager::BNCACHE_LOW_RES_PRELOAD )