add support for random background sets using Song genre

This commit is contained in:
Chris Danford
2005-06-02 10:09:46 +00:00
parent 882f1d7447
commit c80d0c4a53
6 changed files with 141 additions and 61 deletions
+17
View File
@@ -878,6 +878,23 @@ void GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, b
FILEMAN->GetDirListing( sPath, AddTo, bOnlyDirs, bReturnPathToo );
}
void GetDirListingRecursive( const CString &sDir, const CString &sMatch, CStringArray &AddTo )
{
ASSERT( sDir.Right(1) == "/" );
GetDirListing( sDir+sMatch, AddTo, false, true );
GetDirListing( sDir+"*", AddTo, true, true );
for( unsigned i=0; i<AddTo.size(); i++ )
{
if( IsADirectory( AddTo[i] ) )
{
GetDirListing( AddTo[i]+"/"+sMatch, AddTo, false, true );
GetDirListing( AddTo[i]+"/*", AddTo, true, true );
AddTo.erase( AddTo.begin()+i );
i--;
}
}
}
void FlushDirCache()
{
FILEMAN->FlushDirCache( "" );