Only rebuild the removable device list when it changes.

This commit is contained in:
Steve Checkoway
2005-12-10 08:41:16 +00:00
parent 63a56b14c4
commit 43066e5cb1
4 changed files with 77 additions and 3 deletions
@@ -8,6 +8,16 @@
#include <unistd.h>
#include <Carbon/Carbon.h>
MemoryCardDriverThreaded_OSX::MemoryCardDriverThreaded_OSX()
{
DarwinMCHelpers::Start();
}
MemoryCardDriverThreaded_OSX::~MemoryCardDriverThreaded_OSX()
{
DarwinMCHelpers::Stop();
}
void MemoryCardDriverThreaded_OSX::Flush( UsbStorageDevice *pDevice )
{
if( pDevice->iRefNum == -1 )
@@ -23,6 +33,11 @@ void MemoryCardDriverThreaded_OSX::Flush( UsbStorageDevice *pDevice )
LOG->Warn( "Failed to flush the memory card." );
}
bool MemoryCardDriverThreaded_OSX::USBStorageDevicesChanged()
{
return DarwinMCHelpers::DevicesChanged();
}
void MemoryCardDriverThreaded_OSX::GetUSBStorageDevices( vector<UsbStorageDevice>& vDevicesOut )
{
LOG->Trace( "GetUSBStorageDevices." );