Fix ScreenSelectProfile::Finish()
Unload all profiles first, so we don't end up in a situation where two players might have the same profile assigned during iteration.
This commit is contained in:
@@ -181,13 +181,18 @@ bool ScreenSelectProfile::Finish(){
|
||||
if( iUnselectedProfiles && iUsedLocalProfiles < PROFILEMAN->GetNumLocalProfiles() )
|
||||
return false;
|
||||
|
||||
// all ok - load profiles and go to next screen
|
||||
// unload all profiles, so we don't end up in a situation where two
|
||||
// players might have the same profile assigned
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
MEMCARDMAN->UnlockCard( p );
|
||||
MEMCARDMAN->UnmountCard( p );
|
||||
PROFILEMAN->UnloadProfile( p );
|
||||
}
|
||||
|
||||
// all ok - load profiles and go to next screen
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
if( m_iSelectedProfiles[p] > 0 )
|
||||
{
|
||||
PROFILEMAN->m_sDefaultLocalProfileID[p].Set( PROFILEMAN->GetLocalProfileIDFromIndex( m_iSelectedProfiles[p] - 1 ) );
|
||||
|
||||
Reference in New Issue
Block a user