bool SMLoader::LoadFromDir( const RString &sPath, Song &out ) { vector<RString> aFileNames; GetApplicableFiles( sPath, aFileNames ); if( aFileNames.size() > 1 ) { // Need to break this up first. RString tmp = "Song " + sPath + " has more than one"; LOG->UserLog(tmp, this->GetFileExtension(), "file. There can only be one!"); return false; } ASSERT( aFileNames.size() == 1 ); return LoadFromSimfile( sPath + aFileNames[0], out ); }
bool SMLoader::LoadFromDir( const RString &sPath, Song &out, bool load_autosave ) { vector<RString> aFileNames; GetApplicableFiles( sPath, aFileNames, load_autosave ); return LoadFromSimfile( sPath + aFileNames[0], out ); }