1
0
forked from 0ad/0ad

Minor additions to CConfig

This was SVN commit r70.
This commit is contained in:
MarkT 2003-11-22 02:54:33 +00:00
parent d2538c87e8
commit e1c6c4c954

View File

@ -82,7 +82,24 @@ PS_RESULT CConfig::Register( CStr Filename, void* Data, LoaderFunction DynamicLo
i = m_FileList.begin();
return( PS_OK );
if( !Static )
return( PS_OK );
// Load static files at the point of registration.
PS_RESULT Result;
if( ( Result = DynamicLoader( Filename, Data ) ) != PS_OK )
{
if( m_LogFile )
{
CStr Error = _T( "Load failed on: " );
Error += Filename;
Error += CStr( "Load function returned: " );
Error += CStr( Result );
m_LogFile->WriteError( (const TCHAR*)Error );
}
}
return( Result );
}
//--------------------------------------------------------