This commit is contained in:
Glenn Maynard
2004-12-07 00:09:47 +00:00
parent 495a418884
commit dac3c2b978
2 changed files with 11 additions and 5 deletions
@@ -64,17 +64,24 @@ void MemoryCardDriverThreaded_Windows::ResetUsbStorage()
m_dwLastLogicalDrives = 0;
}
void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate()
bool MemoryCardDriverThreaded_Windows::MountThreadWaitForUpdate()
{
DWORD dwNewLogicalDrives = ::GetLogicalDrives();
if( dwNewLogicalDrives == m_dwLastLogicalDrives )
{
// no change from last update
usleep( 50000 );
return;
return false;
}
m_dwLastLogicalDrives = dwNewLogicalDrives;
return true;
}
void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate()
{
DWORD dwNewLogicalDrives = ::GetLogicalDrives();
{
vector<UsbStorageDevice> vNewStorageDevices;
@@ -120,8 +127,6 @@ void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate()
}
CHECKPOINT;
m_dwLastLogicalDrives = dwNewLogicalDrives;
}
}
@@ -16,6 +16,7 @@ protected:
virtual void Mount( UsbStorageDevice* pDevice, CString sMountPoint );
virtual void ResetUsbStorage();
virtual void MountThreadDoOneUpdate();
virtual bool MountThreadWaitForUpdate();
DWORD m_dwLastLogicalDrives;
};