Remove m_bMemoryCardsMountOnlyWhenNecessary; always do that.
This commit is contained in:
@@ -109,8 +109,9 @@ void GameState::Reset()
|
|||||||
EndGame();
|
EndGame();
|
||||||
|
|
||||||
/* Don't do the OS mount for cards during the attract screens. Only do OS mounts in
|
/* Don't do the OS mount for cards during the attract screens. Only do OS mounts in
|
||||||
* the time between BeginGame and PlayersFinalized. XXX: I think we do that anyway,
|
* the time between BeginGame and PlayersFinalized. I think we do that anyway (except
|
||||||
* when m_bMemoryCardsMountOnlyWhenNecessary is true. Can we remove this? */
|
* for background write tests, which happen anyway unless the memory card thread is
|
||||||
|
* paused). Can we remove this? */
|
||||||
MEMCARDMAN->LockCards();
|
MEMCARDMAN->LockCards();
|
||||||
|
|
||||||
ASSERT( THEME );
|
ASSERT( THEME );
|
||||||
@@ -274,8 +275,7 @@ void GameState::PlayersFinalized()
|
|||||||
ApplyModifiers( pn, DEFAULT_CPU_MODIFIERS );
|
ApplyModifiers( pn, DEFAULT_CPU_MODIFIERS );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( PREFSMAN->m_bMemoryCardsMountOnlyWhenNecessary )
|
MEMCARDMAN->UnmountAllUsedCards();
|
||||||
MEMCARDMAN->UnmountAllUsedCards();
|
|
||||||
MEMCARDMAN->UnPauseMountingThread();
|
MEMCARDMAN->UnPauseMountingThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,8 +351,7 @@ void GameState::EndGame()
|
|||||||
}
|
}
|
||||||
|
|
||||||
MEMCARDMAN->PauseMountingThread();
|
MEMCARDMAN->PauseMountingThread();
|
||||||
if( PREFSMAN->m_bMemoryCardsMountOnlyWhenNecessary )
|
MEMCARDMAN->MountAllUsedCards();
|
||||||
MEMCARDMAN->MountAllUsedCards();
|
|
||||||
|
|
||||||
BOOKKEEPER->WriteToDisk();
|
BOOKKEEPER->WriteToDisk();
|
||||||
PROFILEMAN->SaveAllProfiles();
|
PROFILEMAN->SaveAllProfiles();
|
||||||
@@ -365,8 +364,7 @@ void GameState::EndGame()
|
|||||||
PROFILEMAN->UnloadProfile( pn );
|
PROFILEMAN->UnloadProfile( pn );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( PREFSMAN->m_bMemoryCardsMountOnlyWhenNecessary )
|
MEMCARDMAN->UnmountAllUsedCards();
|
||||||
MEMCARDMAN->UnmountAllUsedCards();
|
|
||||||
|
|
||||||
// Reset the USB storage device numbers -after- saving
|
// Reset the USB storage device numbers -after- saving
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
|||||||
@@ -246,8 +246,7 @@ void MemoryCardManager::TryMountAllCards()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When m_bMemoryCardsMountOnlyWhenNecessary, called in EndGame just before writing the
|
/* Called in EndGame just before writing the profile. Should block. */
|
||||||
* profile. Should block. */
|
|
||||||
void MemoryCardManager::MountAllUsedCards()
|
void MemoryCardManager::MountAllUsedCards()
|
||||||
{
|
{
|
||||||
FOREACH_EnabledPlayer( p )
|
FOREACH_EnabledPlayer( p )
|
||||||
|
|||||||
@@ -335,7 +335,6 @@ void PrefsManager::Init()
|
|||||||
m_iMemoryCardUsbPort[p] = -1;
|
m_iMemoryCardUsbPort[p] = -1;
|
||||||
m_iMemoryCardUsbLevel[p] = -1;
|
m_iMemoryCardUsbLevel[p] = -1;
|
||||||
}
|
}
|
||||||
m_bMemoryCardsMountOnlyWhenNecessary = false;
|
|
||||||
|
|
||||||
m_sMemoryCardProfileSubdir = PRODUCT_NAME;
|
m_sMemoryCardProfileSubdir = PRODUCT_NAME;
|
||||||
m_iProductID = 1;
|
m_iProductID = 1;
|
||||||
@@ -536,7 +535,6 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
|||||||
ini.GetValue( "Options", ssprintf("MemoryCardUsbPortP%d",p+1), m_iMemoryCardUsbPort[p] );
|
ini.GetValue( "Options", ssprintf("MemoryCardUsbPortP%d",p+1), m_iMemoryCardUsbPort[p] );
|
||||||
ini.GetValue( "Options", ssprintf("MemoryCardUsbLevelP%d",p+1), m_iMemoryCardUsbLevel[p] );
|
ini.GetValue( "Options", ssprintf("MemoryCardUsbLevelP%d",p+1), m_iMemoryCardUsbLevel[p] );
|
||||||
}
|
}
|
||||||
ini.GetValue( "Options", "MemoryCardsMountOnlyWhenNecessary", m_bMemoryCardsMountOnlyWhenNecessary );
|
|
||||||
|
|
||||||
ini.GetValue( "Options", "CenterImageTranslateX", m_iCenterImageTranslateX );
|
ini.GetValue( "Options", "CenterImageTranslateX", m_iCenterImageTranslateX );
|
||||||
ini.GetValue( "Options", "CenterImageTranslateY", m_iCenterImageTranslateY );
|
ini.GetValue( "Options", "CenterImageTranslateY", m_iCenterImageTranslateY );
|
||||||
@@ -766,7 +764,6 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
ini.SetValue( "Options", ssprintf("MemoryCardUsbPortP%d",p+1), m_iMemoryCardUsbPort[p] );
|
ini.SetValue( "Options", ssprintf("MemoryCardUsbPortP%d",p+1), m_iMemoryCardUsbPort[p] );
|
||||||
ini.SetValue( "Options", ssprintf("MemoryCardUsbLevelP%d",p+1), m_iMemoryCardUsbLevel[p] );
|
ini.SetValue( "Options", ssprintf("MemoryCardUsbLevelP%d",p+1), m_iMemoryCardUsbLevel[p] );
|
||||||
}
|
}
|
||||||
ini.SetValue( "Options", "MemoryCardsMountOnlyWhenNecessary", m_bMemoryCardsMountOnlyWhenNecessary );
|
|
||||||
|
|
||||||
ini.SetValue( "Options", "CenterImageTranslateX", m_iCenterImageTranslateX );
|
ini.SetValue( "Options", "CenterImageTranslateX", m_iCenterImageTranslateX );
|
||||||
ini.SetValue( "Options", "CenterImageTranslateY", m_iCenterImageTranslateY );
|
ini.SetValue( "Options", "CenterImageTranslateY", m_iCenterImageTranslateY );
|
||||||
|
|||||||
@@ -192,7 +192,6 @@ public:
|
|||||||
int m_iMemoryCardUsbBus[NUM_PLAYERS]; // look for this bus when assigning cards. -1 = match any
|
int m_iMemoryCardUsbBus[NUM_PLAYERS]; // look for this bus when assigning cards. -1 = match any
|
||||||
int m_iMemoryCardUsbPort[NUM_PLAYERS]; // look for this port when assigning cards. -1 = match any
|
int m_iMemoryCardUsbPort[NUM_PLAYERS]; // look for this port when assigning cards. -1 = match any
|
||||||
int m_iMemoryCardUsbLevel[NUM_PLAYERS]; // look for this level when assigning cards. -1 = match any
|
int m_iMemoryCardUsbLevel[NUM_PLAYERS]; // look for this level when assigning cards. -1 = match any
|
||||||
bool m_bMemoryCardsMountOnlyWhenNecessary;
|
|
||||||
int m_iCenterImageTranslateX;
|
int m_iCenterImageTranslateX;
|
||||||
int m_iCenterImageTranslateY;
|
int m_iCenterImageTranslateY;
|
||||||
int m_fCenterImageAddWidth;
|
int m_fCenterImageAddWidth;
|
||||||
|
|||||||
@@ -1358,7 +1358,7 @@ void ScreenEvaluation::Input( const DeviceInput& DeviceI, const InputEventType t
|
|||||||
PROFILEMAN->IsUsingProfile(pn) )
|
PROFILEMAN->IsUsingProfile(pn) )
|
||||||
{
|
{
|
||||||
MEMCARDMAN->PauseMountingThread();
|
MEMCARDMAN->PauseMountingThread();
|
||||||
if( PROFILEMAN->ProfileWasLoadedFromMemoryCard(pn) && PREFSMAN->m_bMemoryCardsMountOnlyWhenNecessary )
|
if( PROFILEMAN->ProfileWasLoadedFromMemoryCard(pn) )
|
||||||
MEMCARDMAN->MountCard( pn );
|
MEMCARDMAN->MountCard( pn );
|
||||||
|
|
||||||
Profile* pProfile = PROFILEMAN->GetProfile(pn);
|
Profile* pProfile = PROFILEMAN->GetProfile(pn);
|
||||||
@@ -1367,7 +1367,7 @@ void ScreenEvaluation::Input( const DeviceInput& DeviceI, const InputEventType t
|
|||||||
CString sFileName = SaveScreenshot( sDir, true, true, iScreenshotIndex );
|
CString sFileName = SaveScreenshot( sDir, true, true, iScreenshotIndex );
|
||||||
CString sPath = sDir+sFileName;
|
CString sPath = sDir+sFileName;
|
||||||
|
|
||||||
if( PROFILEMAN->ProfileWasLoadedFromMemoryCard(pn) && PREFSMAN->m_bMemoryCardsMountOnlyWhenNecessary )
|
if( PROFILEMAN->ProfileWasLoadedFromMemoryCard(pn) )
|
||||||
MEMCARDMAN->UnmountCard( pn );
|
MEMCARDMAN->UnmountCard( pn );
|
||||||
MEMCARDMAN->UnPauseMountingThread();
|
MEMCARDMAN->UnPauseMountingThread();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user