fix windows compile

This commit is contained in:
Chris Danford
2004-08-17 05:59:41 +00:00
parent 11a8029493
commit f43fc93985
@@ -68,11 +68,7 @@ void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate()
{ {
DWORD dwNewLogicalDrives = ::GetLogicalDrives(); DWORD dwNewLogicalDrives = ::GetLogicalDrives();
if( m_bForceRedetectNextUpdate ) if( dwNewLogicalDrives == m_dwLastLogicalDrives )
{
m_bForceRedetectNextUpdate = false;
}
else if( dwNewLogicalDrives == m_dwLastLogicalDrives )
{ {
// no change from last update // no change from last update
usleep( 50000 ); usleep( 50000 );
@@ -80,7 +76,7 @@ void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate()
} }
{ {
vector<UsbStorageDeviceEx> vNewStorageDevices; vector<UsbStorageDevice> vNewStorageDevices;
const int MAX_DRIVES = 26; const int MAX_DRIVES = 26;
for( int i=2; i<MAX_DRIVES; i++ ) // skip 'a:" and "b:" for( int i=2; i<MAX_DRIVES; i++ ) // skip 'a:" and "b:"
@@ -98,22 +94,17 @@ void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate()
if( !TestReady(sDrive) ) if( !TestReady(sDrive) )
continue; continue;
UsbStorageDeviceEx usbd; UsbStorageDevice usbd;
usbd.sOsMountDir = sDrive; usbd.sOsMountDir = sDrive;
usbd.bWriteTestSucceeded = TestWrite( sDrive );
if( ShouldDoOsMount() ) // read name
{ this->Mount( &usbd, TEMP_MOUNT_POINT );
usbd.bWriteTestSucceeded = TestWrite( sDrive ); FILEMAN->FlushDirCache( TEMP_MOUNT_POINT );
Profile profile;
// read name CString sProfileDir = TEMP_MOUNT_POINT + PREFSMAN->m_sMemoryCardProfileSubdir + '/';
this->Mount( &usbd, TEMP_MOUNT_POINT ); profile.LoadEditableDataFromDir( sProfileDir );
FILEMAN->FlushDirCache( TEMP_MOUNT_POINT ); usbd.sName = profile.GetDisplayName();
Profile profile; UnmountMountPoint( TEMP_MOUNT_POINT );
CString sProfileDir = TEMP_MOUNT_POINT + PREFSMAN->m_sMemoryCardProfileSubdir + '/';
profile.LoadEditableDataFromDir( sProfileDir );
usbd.sName = profile.GetDisplayName();
UnmountMountPoint( TEMP_MOUNT_POINT );
}
vNewStorageDevices.push_back( usbd ); vNewStorageDevices.push_back( usbd );
} }