lock on successful load
This commit is contained in:
@@ -465,9 +465,6 @@ void GameState::LoadProfiles( bool bLoadEdits )
|
|||||||
|
|
||||||
MEMCARDMAN->WaitForCheckingToComplete();
|
MEMCARDMAN->WaitForCheckingToComplete();
|
||||||
|
|
||||||
FOREACH_PlayerNumber( pn )
|
|
||||||
MEMCARDMAN->LockCard( pn );
|
|
||||||
|
|
||||||
FOREACH_HumanPlayer( pn )
|
FOREACH_HumanPlayer( pn )
|
||||||
{
|
{
|
||||||
// If a profile is already loaded, this was already called.
|
// If a profile is already loaded, this was already called.
|
||||||
@@ -475,9 +472,15 @@ void GameState::LoadProfiles( bool bLoadEdits )
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
MEMCARDMAN->MountCard( pn );
|
MEMCARDMAN->MountCard( pn );
|
||||||
PROFILEMAN->LoadFirstAvailableProfile( pn, bLoadEdits ); // load full profile
|
bool bSuccess = PROFILEMAN->LoadFirstAvailableProfile( pn, bLoadEdits ); // load full profile
|
||||||
MEMCARDMAN->UnmountCard( pn );
|
MEMCARDMAN->UnmountCard( pn );
|
||||||
|
|
||||||
|
if( !bSuccess )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* Lock the card on successful load, so we won't allow it to be changed. */
|
||||||
|
MEMCARDMAN->LockCard( pn );
|
||||||
|
|
||||||
LoadCurrentSettingsFromProfile( pn );
|
LoadCurrentSettingsFromProfile( pn );
|
||||||
|
|
||||||
Profile* pPlayerProfile = PROFILEMAN->GetProfile( pn );
|
Profile* pPlayerProfile = PROFILEMAN->GetProfile( pn );
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "InputEventPlus.h"
|
#include "InputEventPlus.h"
|
||||||
#include "MenuTimer.h"
|
#include "MenuTimer.h"
|
||||||
|
#include "MemoryCardManager.h"
|
||||||
|
|
||||||
|
|
||||||
REGISTER_SCREEN_CLASS( ScreenContinue );
|
REGISTER_SCREEN_CLASS( ScreenContinue );
|
||||||
@@ -19,7 +20,10 @@ void ScreenContinue::BeginScreen()
|
|||||||
{
|
{
|
||||||
bool bPlayerDone = GAMESTATE->m_iPlayerStageTokens[p] <= 0;
|
bool bPlayerDone = GAMESTATE->m_iPlayerStageTokens[p] <= 0;
|
||||||
if( bPlayerDone )
|
if( bPlayerDone )
|
||||||
|
{
|
||||||
GAMESTATE->UnjoinPlayer( p );
|
GAMESTATE->UnjoinPlayer( p );
|
||||||
|
MEMCARDMAN->UnlockCard( p );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenWithMenuElements::BeginScreen();
|
ScreenWithMenuElements::BeginScreen();
|
||||||
|
|||||||
@@ -16,13 +16,6 @@ void ScreenProfileLoad::Init()
|
|||||||
void ScreenProfileLoad::BeginScreen()
|
void ScreenProfileLoad::BeginScreen()
|
||||||
{
|
{
|
||||||
m_bHaveProfileToLoad = GAMESTATE->HaveProfileToLoad();
|
m_bHaveProfileToLoad = GAMESTATE->HaveProfileToLoad();
|
||||||
if( !m_bHaveProfileToLoad )
|
|
||||||
{
|
|
||||||
/* We have nothing to load, so just lock the cards. */
|
|
||||||
FOREACH_PlayerNumber( pn )
|
|
||||||
MEMCARDMAN->LockCard( pn );
|
|
||||||
}
|
|
||||||
|
|
||||||
ScreenWithMenuElements::BeginScreen();
|
ScreenWithMenuElements::BeginScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user