windows memory card fixes/cleanup

This commit is contained in:
Chris Danford
2003-12-18 07:46:21 +00:00
parent eb0620add8
commit 1ba5e253ca
4 changed files with 115 additions and 25 deletions
@@ -4,7 +4,9 @@
struct UsbStorageDevice
{
UsbStorageDevice()
UsbStorageDevice() { MakeBlank(); }
void MakeBlank()
{
iBus = -1;
iDeviceOnBus = -1;
@@ -18,11 +20,18 @@ struct UsbStorageDevice
int iUsbStorageIndex;
CString sOsMountDir; // WITHOUT trailing slash
bool IsBlank() { return sOsMountDir.empty(); }
bool operator==(const UsbStorageDevice& other)
{
return
iBus==other.iBus &&
iDeviceOnBus==other.iDeviceOnBus; // every time a device is plugged in, it gets a unique device number
// ugly...
#if _WINDOWS
// we don't have hub/port number info on Windows
return sOsMountDir==other.sOsMountDir; // every time a device is plugged in, it gets a unique device number
#else // LINUX or other
return iBus==other.iBus &&
iDeviceOnBus==other.iDeviceOnBus; // every time a device is plugged in, it gets a unique device number
#endif
}
};