don't strip "*danger*" backgrounds; the danger background doesn't
go in BGAnimations anymore
This commit is contained in:
Glenn Maynard
2004-04-10 00:47:52 +00:00
parent 41ef3028c6
commit 1f9f980782
+9 -9
View File
@@ -207,16 +207,11 @@ CString Background::CreateRandomBGA()
default:
FAIL_M( ssprintf("Invalid BackgroundMode: %i", PREFSMAN->m_BackgroundMode) );
break;
case PrefsManager::BGMODE_ANIMATIONS:
{
GetDirListing( BG_ANIMS_DIR+"*", arrayPaths, true, true );
// strip out "cvs" and "danger
int i;
for( i=arrayPaths.size()-1; i>=0; i-- )
if( 0==stricmp(arrayPaths[i].Right(3),"cvs") || 0==stricmp(arrayPaths[i].Right(3),"danger") )
arrayPaths.erase(arrayPaths.begin()+i, arrayPaths.begin()+i+1);
break;
}
GetDirListing( BG_ANIMS_DIR+"*", arrayPaths, true, true );
break;
case PrefsManager::BGMODE_MOVIEVIS:
GetDirListing( VISUALIZATIONS_DIR + "*.avi", arrayPaths, false, true );
GetDirListing( VISUALIZATIONS_DIR + "*.mpg", arrayPaths, false, true );
@@ -230,6 +225,11 @@ CString Background::CreateRandomBGA()
break;
}
// strip out "cvs"
for( int j=arrayPaths.size()-1; j>=0; j-- )
if( !Basename(arrayPaths[j]).CompareNoCase("cvs") )
arrayPaths.erase( arrayPaths.begin()+j, arrayPaths.begin()+j+1 );
if( arrayPaths.empty() )
return "";