real fix for Windows memcards
This commit is contained in:
@@ -43,9 +43,6 @@ void MemoryCardManager::Update( float fDelta )
|
||||
vector<UsbStorageDevice> vConnects; // fill these in below
|
||||
vector<UsbStorageDevice> vDisconnects; // fill these in below
|
||||
|
||||
FOREACH( UsbStorageDevice, m_vStorageDevices, d )
|
||||
FixSlashesInPlace( d->sOsMountDir );
|
||||
|
||||
// check for disconnects
|
||||
FOREACH( UsbStorageDevice, vOld, old )
|
||||
{
|
||||
|
||||
@@ -18,6 +18,12 @@ bool UsbStorageDevice::operator==(const UsbStorageDevice& other) const
|
||||
#undef COMPARE
|
||||
}
|
||||
|
||||
void UsbStorageDevice::SetOsMountDir( const CString &s )
|
||||
{
|
||||
sOsMountDir = s;
|
||||
FixSlashesInPlace( sOsMountDir );
|
||||
}
|
||||
|
||||
|
||||
MemoryCardDriver *MakeMemoryCardDriver()
|
||||
{
|
||||
|
||||
@@ -30,7 +30,8 @@ struct UsbStorageDevice
|
||||
bool bWriteTestSucceeded; // only valid if bNeedsWriteTest == false
|
||||
CString sName; // Name in the profile on the memory card.
|
||||
|
||||
bool IsBlank() { return sOsMountDir.empty(); }
|
||||
bool IsBlank() const { return sOsMountDir.empty(); }
|
||||
void SetOsMountDir( const CString &s );
|
||||
|
||||
bool operator==(const UsbStorageDevice& other) const;
|
||||
};
|
||||
|
||||
@@ -95,7 +95,7 @@ void MemoryCardDriverThreaded_Windows::MountThreadDoOneUpdate()
|
||||
continue;
|
||||
|
||||
UsbStorageDevice usbd;
|
||||
usbd.sOsMountDir = sDrive;
|
||||
usbd.SetOsMountDir( sDrive );
|
||||
usbd.bWriteTestSucceeded = TestWrite( sDrive );
|
||||
// read name
|
||||
this->Mount( &usbd, TEMP_MOUNT_POINT );
|
||||
|
||||
Reference in New Issue
Block a user