unload usb-storage driver between games
This commit is contained in:
@@ -235,4 +235,6 @@ void MemoryCardManager::FlushAllDisks()
|
||||
continue; // skip
|
||||
m_pDriver->Flush(&m_Device[p]);
|
||||
}
|
||||
|
||||
m_pDriver->ResetUsbDeviceNumbers();
|
||||
}
|
||||
|
||||
@@ -45,7 +45,8 @@ public:
|
||||
virtual bool StorageDevicesChanged() = 0;
|
||||
virtual void GetStorageDevices( vector<UsbStorageDevice>& vStorageDevicesOut ) = 0;
|
||||
virtual bool MountAndTestWrite( UsbStorageDevice* pDevice ) = 0; // return false if mount or write fails
|
||||
virtual void Flush( UsbStorageDevice* pDevice ) { }
|
||||
virtual void Flush( UsbStorageDevice* pDevice ) {}
|
||||
virtual void ResetUsbStorage() {};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -254,6 +254,13 @@ void MemoryCardDriver_Linux::Flush( UsbStorageDevice* pDevice )
|
||||
system( sCommand );
|
||||
}
|
||||
|
||||
void MemoryCardDriver_Linux::ResetUsbStorage()
|
||||
{
|
||||
system( "rmmod usb-storage" );
|
||||
system( "modprobe usb-storage" );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||
* Chris Danford
|
||||
|
||||
Reference in New Issue
Block a user