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