From f43fc9398523846b66c2e783cb7aa2d8a00741e7 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 17 Aug 2004 05:59:41 +0000 Subject: [PATCH] fix windows compile --- .../MemoryCardDriverThreaded_Windows.cpp | 33 +++++++------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp index 35d60721f8..af255d3d29 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp @@ -68,11 +68,7 @@ void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate() { DWORD dwNewLogicalDrives = ::GetLogicalDrives(); - if( m_bForceRedetectNextUpdate ) - { - m_bForceRedetectNextUpdate = false; - } - else if( dwNewLogicalDrives == m_dwLastLogicalDrives ) + if( dwNewLogicalDrives == m_dwLastLogicalDrives ) { // no change from last update usleep( 50000 ); @@ -80,7 +76,7 @@ void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate() } { - vector vNewStorageDevices; + vector vNewStorageDevices; const int MAX_DRIVES = 26; for( int i=2; iMount( &usbd, TEMP_MOUNT_POINT ); - FILEMAN->FlushDirCache( TEMP_MOUNT_POINT ); - Profile profile; - CString sProfileDir = TEMP_MOUNT_POINT + PREFSMAN->m_sMemoryCardProfileSubdir + '/'; - profile.LoadEditableDataFromDir( sProfileDir ); - usbd.sName = profile.GetDisplayName(); - UnmountMountPoint( TEMP_MOUNT_POINT ); - } + usbd.bWriteTestSucceeded = TestWrite( sDrive ); + // read name + this->Mount( &usbd, TEMP_MOUNT_POINT ); + FILEMAN->FlushDirCache( TEMP_MOUNT_POINT ); + Profile profile; + CString sProfileDir = TEMP_MOUNT_POINT + PREFSMAN->m_sMemoryCardProfileSubdir + '/'; + profile.LoadEditableDataFromDir( sProfileDir ); + usbd.sName = profile.GetDisplayName(); + UnmountMountPoint( TEMP_MOUNT_POINT ); vNewStorageDevices.push_back( usbd ); }