Fix unnecessary remounts of cards that weren't changed since last update.\nDon't do OS mounts or unmounts while after cards are locked. It can cause skips.

This commit is contained in:
Chris Danford
2004-08-08 18:44:41 +00:00
parent fc4251f798
commit 551800cceb
7 changed files with 59 additions and 24 deletions
@@ -29,17 +29,7 @@ struct UsbStorageDevice
bool IsBlank() { return sOsMountDir.empty(); }
bool operator==(const UsbStorageDevice& other) const
{
#define COMPARE(x) if( x != other.x ) return false;
COMPARE( iBus );
COMPARE( iPort );
COMPARE( iLevel );
COMPARE( sName );
COMPARE( sOsMountDir );
return true;
#undef COMPARE
}
bool operator==(const UsbStorageDevice& other) const;
bool operator!=(const UsbStorageDevice& other) const
{
return !operator==(other);
@@ -59,6 +49,8 @@ public:
virtual void ResetUsbStorage() = 0;
virtual void PauseMountingThread() = 0;
virtual void UnPauseMountingThread() = 0;
virtual void DoOsMount() = 0;
virtual void DontDoOsMount() = 0;
};
MemoryCardDriver *MakeMemoryCardDriver();