diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.cpp b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.cpp index 7027186558..aceef009dc 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.cpp +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.cpp @@ -103,7 +103,6 @@ static void GetFileList( const CString &sPath, vector &out ) bool MemoryCardDriverThreaded_Linux::USBStorageDevicesChanged() { - static CString sLastDevices = ""; CString sThisDevices; /* If a device is removed and reinserted, the inode of the /sys/block entry @@ -122,8 +121,8 @@ bool MemoryCardDriverThreaded_Linux::USBStorageDevicesChanged() sThisDevices += ssprintf( "%i,", (int) buf.st_ino ); } - bool bChanged = sThisDevices != sLastDevices; - sLastDevices = sThisDevices; + bool bChanged = sThisDevices != m_sLastDevices; + m_sLastDevices = sThisDevices; if( bChanged ) LOG->Trace( "Change in USB storage devices detected." ); return bChanged; diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.h b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.h index 80702eced0..0d545d889a 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.h +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Linux.h @@ -19,6 +19,8 @@ protected: void GetUSBStorageDevices( vector& vDevicesOut ); bool USBStorageDevicesChanged(); bool TestWrite( UsbStorageDevice* pDevice ); + + CString m_sLastDevices; }; #ifdef ARCH_MEMORY_CARD_DRIVER