real fix for Windows memcards

This commit is contained in:
Glenn Maynard
2004-09-05 23:45:57 +00:00
parent 83265c4d63
commit 1d5e04b024
4 changed files with 9 additions and 5 deletions
-3
View File
@@ -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 );