Only rebuild the removable device list when it changes.
This commit is contained in:
@@ -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." );
|
||||
|
||||
Reference in New Issue
Block a user