diff --git a/stepmania/src/BackgroundUtil.cpp b/stepmania/src/BackgroundUtil.cpp index 21ff0123b2..0551bb350b 100644 --- a/stepmania/src/BackgroundUtil.cpp +++ b/stepmania/src/BackgroundUtil.cpp @@ -33,10 +33,14 @@ void BackgroundUtil::SortBackgroundChangesArray( vector &vBack sort( vBackgroundChanges.begin(), vBackgroundChanges.end(), CompareBackgroundChanges ); } -void BackgroundUtil::GetBackgroundEffects( const CString &sName, vector &vsPathsOut, vector &vsNamesOut ) +void BackgroundUtil::GetBackgroundEffects( const CString &_sName, vector &vsPathsOut, vector &vsNamesOut ) { + CString sName = _sName; + if( sName == "" ) + sName = "*"; + vsPathsOut.clear(); - GetDirListing( BACKGROUND_EFFECTS_DIR+sName+"*.xml", vsPathsOut, false, true ); + GetDirListing( BACKGROUND_EFFECTS_DIR+sName+".xml", vsPathsOut, false, true ); vsNamesOut.clear(); FOREACH_CONST( CString, vsPathsOut, s ) @@ -45,10 +49,14 @@ void BackgroundUtil::GetBackgroundEffects( const CString &sName, vector StripCvs( vsPathsOut, vsNamesOut ); } -void BackgroundUtil::GetBackgroundTransitions( const CString &sName, vector &vsPathsOut, vector &vsNamesOut ) +void BackgroundUtil::GetBackgroundTransitions( const CString &_sName, vector &vsPathsOut, vector &vsNamesOut ) { + CString sName = _sName; + if( sName == "" ) + sName = "*"; + vsPathsOut.clear(); - GetDirListing( BACKGROUND_TRANSITIONS_DIR+sName+"*.xml", vsPathsOut, false, true ); + GetDirListing( BACKGROUND_TRANSITIONS_DIR+sName+".xml", vsPathsOut, false, true ); vsNamesOut.clear(); FOREACH_CONST( CString, vsPathsOut, s )