From 04a10344836e449695d5e096e266d52cd8d8708c Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 17 Dec 2003 08:43:14 +0000 Subject: [PATCH] working on memory cards --- stepmania/src/MemoryCardManager.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/stepmania/src/MemoryCardManager.cpp b/stepmania/src/MemoryCardManager.cpp index cae9979f21..4b527ab8f4 100644 --- a/stepmania/src/MemoryCardManager.cpp +++ b/stepmania/src/MemoryCardManager.cpp @@ -53,11 +53,7 @@ MemoryCardManager* MEMCARDMAN = NULL; // global and accessable from anywhere in { return iBus==other.iBus && - iDeviceOnBus==other.iDeviceOnBus && - iPortOnHub==other.iPortOnHub && - sSerial==other.sSerial && - iUsbStorageIndex==other.iUsbStorageIndex && - sOsMountDir==other.sOsMountDir; + iDeviceOnBus==other.iDeviceOnBus; // every time a device is plugged in, it gets a unique device number } }; @@ -222,7 +218,20 @@ MemoryCardManager* MEMCARDMAN = NULL; // global and accessable from anywhere in } } } - return; + + { + // try to mount + for( unsigned i=0; iSystemMessage( "USB changed" ); - return; vector vOld = g_StorageDevices; // make a copy UpdateAttachedUsbStorageDevices(); vector &vNew = g_StorageDevices; @@ -278,7 +285,7 @@ MemoryCardManager* MEMCARDMAN = NULL; // global and accessable from anywhere in { const UsbStorageDevice old = vOld[i]; if( find(vNew.begin(),vNew.end(),old) == vNew.end() ) - SCREENMAN->SystemMessage( ssprintf("Disconnected bus %d port %d device %d", old.iBus, old.iPortOnHub, old.iDeviceOnBus) ); + SCREENMAN->SystemMessage( ssprintf("Disconnected bus %d port %d device %d path %s", old.iBus, old.iPortOnHub, old.iDeviceOnBus, old.sOsMountDir.c_str()) ); } // check for connects @@ -286,7 +293,7 @@ MemoryCardManager* MEMCARDMAN = NULL; // global and accessable from anywhere in { const UsbStorageDevice newd = vNew[i]; if( find(vOld.begin(),vOld.end(),newd) == vOld.end() ) - SCREENMAN->SystemMessage( ssprintf("Connected bus %d port %d device %d", newd.iBus, newd.iPortOnHub, newd.iDeviceOnBus) ); + SCREENMAN->SystemMessage( ssprintf("Connected bus %d port %d device %d path %s", newd.iBus, newd.iPortOnHub, newd.iDeviceOnBus, newd.sOsMountDir.c_str()) ); } } }