windows memory card fixes/cleanup
This commit is contained in:
@@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user