serialize all memory card operations since mount operations hang if we're doing lsusb or reading USB mass storage descriptors in another thread

This commit is contained in:
Chris Danford
2004-10-09 08:16:48 +00:00
parent f8a8294588
commit bc39cb5079
5 changed files with 26 additions and 26 deletions
-9
View File
@@ -139,12 +139,9 @@ bool ProfileManager::LoadProfileFromMemoryCard( PlayerNumber pn )
sDir += PREFSMAN->m_sMemoryCardProfileSubdir;
sDir += '/';
MEMCARDMAN->PauseMountingThread();
bool bSuccess;
bSuccess = LoadProfile( pn, sDir, true );
MEMCARDMAN->UnPauseMountingThread();
return true; // If a card is inserted, we want to use the memory card to save - even if the Profile load failed.
}
@@ -180,14 +177,8 @@ bool ProfileManager::SaveProfile( PlayerNumber pn ) const
if( m_sProfileDir[pn].empty() )
return false;
if( ProfileWasLoadedFromMemoryCard(pn) )
MEMCARDMAN->PauseMountingThread();
bool b = m_Profile[pn].SaveAllToDir( m_sProfileDir[pn], PREFSMAN->m_bSignProfileData );
if( ProfileWasLoadedFromMemoryCard(pn) )
MEMCARDMAN->UnPauseMountingThread();
return b;
}