From e252c200eb26d665812586aa1325d213f2b6d59e Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 17 Jul 2007 09:46:07 +0000 Subject: [PATCH] Testing hack: Allow non-removable drive letters to be used if that driver letter is specified as a m_sMemoryCardOsMountPoint. --- .../MemoryCardDriverThreaded_Windows.cpp | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp index 8455790a8a..a0fcbba407 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriverThreaded_Windows.cpp @@ -3,6 +3,8 @@ #include "RageUtil.h" #include "RageLog.h" #include "archutils/Win32/ErrorStrings.h" +#include "PlayerNumber.h" +#include "MemoryCardManager.h" MemoryCardDriverThreaded_Windows::MemoryCardDriverThreaded_Windows() { @@ -115,14 +117,30 @@ void MemoryCardDriverThreaded_Windows::GetUSBStorageDevices( vectorm_sMemoryCardOsMountPoint[p].Get().EqualsNoCase(sDrive); + + RString sDrivePath = sDrive + "\\"; + + if( bIsSpecifiedMountPoint ) { - LOG->Trace( "not DRIVE_REMOVABLE" ); - continue; + LOG->Trace( "'%s' is a specified mount point. Allowing...", sDrive.c_str() ); + } + else + { + if( GetDriveType(sDrivePath) != DRIVE_REMOVABLE ) + { + LOG->Trace( "not DRIVE_REMOVABLE" ); + continue; + } } RString sVolumeLabel; - if( !TestReady(sDrive + "\\", sVolumeLabel) ) + if( !TestReady(sDrivePath, sVolumeLabel) ) { LOG->Trace( "not TestReady" ); continue;