LoadFile( bHeaderOnly ): only load image dimensions

caching TM4: 37 secs -> 28 secs
only implemented for PNG; 90% of song images are PNG anyway
This commit is contained in:
Glenn Maynard
2004-05-19 05:10:23 +00:00
parent 792cecd972
commit 703ebfca58
5 changed files with 29 additions and 10 deletions
+2 -1
View File
@@ -684,7 +684,8 @@ void Song::TidyUpData()
continue; // skip
CString sPath = m_sSongDir + arrayImages[i];
SDL_Surface *img = RageSurface::LoadFile( sPath );
/* We only care about the dimensions. */
SDL_Surface *img = RageSurface::LoadFile( sPath, true );
if( !img )
{
LOG->Trace("Couldn't load '%s': %s", sPath.c_str(), SDL_GetError());