This commit is contained in:
Glenn Maynard
2005-08-11 23:57:20 +00:00
parent 453de64456
commit f4caf2275f
+3 -8
View File
@@ -163,7 +163,6 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn )
vector<CString> asDirsToTry; vector<CString> asDirsToTry;
GetMemoryCardProfileDirectoriesToTry( asDirsToTry ); GetMemoryCardProfileDirectoriesToTry( asDirsToTry );
int iLoadedFrom = -1;
for( unsigned i = 0; i < asDirsToTry.size(); ++i ) for( unsigned i = 0; i < asDirsToTry.size(); ++i )
{ {
const CString &sSubdir = asDirsToTry[i]; const CString &sSubdir = asDirsToTry[i];
@@ -180,7 +179,9 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn )
Profile::LoadResult res = (Profile::LoadResult) LoadProfile( pn, sDir, true ); Profile::LoadResult res = (Profile::LoadResult) LoadProfile( pn, sDir, true );
if( res == Profile::success ) if( res == Profile::success )
{ {
iLoadedFrom = i; /* If importing, store the directory we imported from, for display purposes. */
if( i > 0 )
m_sProfileDirImportedFrom[pn] = asDirsToTry[i];
break; break;
} }
@@ -188,12 +189,6 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn )
break; break;
} }
/* Store the directory we imported from, for display purposes. */
if( iLoadedFrom > 0 )
{
m_sProfileDirImportedFrom[pn] = asDirsToTry[iLoadedFrom];
}
/* If we imported a profile fallback directory, change the memory card /* If we imported a profile fallback directory, change the memory card
* directory back to the preferred directory: never write over imported * directory back to the preferred directory: never write over imported
* scores. */ * scores. */