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:
@@ -6,14 +6,14 @@
|
||||
#include "RageUtil.h"
|
||||
#include "RageFile.h"
|
||||
|
||||
SDL_Surface *RageSurface::LoadFile( const CString &sPath )
|
||||
SDL_Surface *RageSurface::LoadFile( const CString &sPath, bool bHeaderOnly )
|
||||
{
|
||||
const CString ext = GetExtension( sPath );
|
||||
|
||||
CString error;
|
||||
SDL_Surface *ret = NULL;
|
||||
if( !ext.CompareNoCase("png") )
|
||||
ret = RageSurface_Load_PNG( sPath, error );
|
||||
ret = RageSurface_Load_PNG( sPath, bHeaderOnly, error );
|
||||
else if( !ext.CompareNoCase("gif") )
|
||||
ret = RageSurface_Load_GIF( sPath, error );
|
||||
else if( !ext.CompareNoCase("jpg") )
|
||||
|
||||
Reference in New Issue
Block a user