This commit is contained in:
Glenn Maynard
2005-04-24 19:33:46 +00:00
parent e2ab509b8e
commit cabfc056fd
4 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -1014,13 +1014,14 @@ void Profile::LoadEditableDataFromDir( CString sDir )
CLAMP( m_iWeightPounds, 50, 500 );
}
CString Profile::FastLoadProfileNameFromMemoryCard( CString sDir )
bool Profile::FastLoadProfileNameFromMemoryCard( CString sDir, CString &sName )
{
CString sProfileDir = sDir + PREFSMAN->m_sMemoryCardProfileSubdir + '/';
Profile profile;
profile.LoadEditableDataFromDir( sProfileDir );
return profile.GetDisplayName();
sName = profile.GetDisplayName();
return true;
}
void Profile::LoadGeneralDataFromNode( const XNode* pNode )
+1 -1
View File
@@ -283,7 +283,7 @@ public:
bool SaveAllToDir( CString sDir, bool bSignData ) const;
void LoadEditableDataFromDir( CString sDir );
static CString FastLoadProfileNameFromMemoryCard( CString sDir );
static bool FastLoadProfileNameFromMemoryCard( CString sDir, CString &sName );
LoadResult LoadStatsXmlFromNode( const XNode* pNode );
void LoadGeneralDataFromNode( const XNode* pNode );
void LoadSongScoresFromNode( const XNode* pNode );
@@ -238,7 +238,7 @@ bool MemoryCardDriverThreaded_Linux::DoOneUpdate( bool bMount, vector<UsbStorage
d.m_State = UsbStorageDevice::STATE_READY;
FILEMAN->Mount( "dir", d.sOsMountDir, TEMP_MOUNT_POINT );
d.sName = Profile::FastLoadProfileNameFromMemoryCard( TEMP_MOUNT_POINT );
d.bIsNameAvailable = Profile::FastLoadProfileNameFromMemoryCard( TEMP_MOUNT_POINT, d.sName );
FILEMAN->Unmount( "dir", d.sOsMountDir, TEMP_MOUNT_POINT );
}
@@ -99,7 +99,7 @@ bool MemoryCardDriverThreaded_Windows::DoOneUpdate( bool bMount, vector<UsbStora
FILEMAN->Mount( "dir", usbd.sOsMountDir, TEMP_MOUNT_POINT_INTERNAL );
FILEMAN->Mount( "timeout", TEMP_MOUNT_POINT_INTERNAL, TEMP_MOUNT_POINT );
usbd.sName = Profile::FastLoadProfileNameFromMemoryCard( TEMP_MOUNT_POINT );
usbd.bIsNameAvailable = Profile::FastLoadProfileNameFromMemoryCard( TEMP_MOUNT_POINT, usbd.sName );
FILEMAN->Unmount( "timeout", TEMP_MOUNT_POINT_INTERNAL, TEMP_MOUNT_POINT );
FILEMAN->Unmount( "dir", usbd.sOsMountDir, TEMP_MOUNT_POINT_INTERNAL );