more stats cleanup
This commit is contained in:
@@ -353,7 +353,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
|
|||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
ini.GetValue( "Options", ssprintf("DefaultMachineProfileIDP%d",p+1), m_sDefaultMachineProfileID[p] );
|
ini.GetValue( "Options", ssprintf("DefaultLocalProfileIDP%d",p+1), m_sDefaultLocalProfileID[p] );
|
||||||
ini.GetValue( "Options", ssprintf("MemoryCardDirP%d",p+1), m_sMemoryCardDir[p] );
|
ini.GetValue( "Options", ssprintf("MemoryCardDirP%d",p+1), m_sMemoryCardDir[p] );
|
||||||
FixSlashesInPlace( m_sMemoryCardDir[p] );
|
FixSlashesInPlace( m_sMemoryCardDir[p] );
|
||||||
ini.GetValue( "Options", ssprintf("MemoryCardMountCommandP%d",p+1), m_sMemoryCardMountCommand[p] );
|
ini.GetValue( "Options", ssprintf("MemoryCardMountCommandP%d",p+1), m_sMemoryCardMountCommand[p] );
|
||||||
@@ -509,7 +509,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
ini.SetValue( "Options", ssprintf("DefaultMachineProfileIDP%d",p+1), m_sDefaultMachineProfileID[p] );
|
ini.SetValue( "Options", ssprintf("DefaultLocalProfileIDP%d",p+1), m_sDefaultLocalProfileID[p] );
|
||||||
ini.SetValue( "Options", ssprintf("MemoryCardDirP%d",p+1), m_sMemoryCardDir[p] );
|
ini.SetValue( "Options", ssprintf("MemoryCardDirP%d",p+1), m_sMemoryCardDir[p] );
|
||||||
ini.SetValue( "Options", ssprintf("MemoryCardMountCommandP%d",p+1), m_sMemoryCardMountCommand[p] );
|
ini.SetValue( "Options", ssprintf("MemoryCardMountCommandP%d",p+1), m_sMemoryCardMountCommand[p] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public:
|
|||||||
int m_iEndlessNumStagesUntilBreak;
|
int m_iEndlessNumStagesUntilBreak;
|
||||||
int m_iEndlessBreakLength;
|
int m_iEndlessBreakLength;
|
||||||
CString m_sLanguage;
|
CString m_sLanguage;
|
||||||
CString m_sDefaultMachineProfileID[NUM_PLAYERS];
|
CString m_sDefaultLocalProfileID[NUM_PLAYERS];
|
||||||
CString m_sMemoryCardDir[NUM_PLAYERS];
|
CString m_sMemoryCardDir[NUM_PLAYERS];
|
||||||
CString m_sMemoryCardMountCommand[NUM_PLAYERS];
|
CString m_sMemoryCardMountCommand[NUM_PLAYERS];
|
||||||
int m_iCenterImageTranslateX;
|
int m_iCenterImageTranslateX;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include "Course.h"
|
#include "Course.h"
|
||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
#include "ProductInfo.h"
|
#include "ProductInfo.h"
|
||||||
|
#include "RageUtil.h"
|
||||||
|
|
||||||
|
|
||||||
ProfileManager* PROFILEMAN = NULL; // global and accessable from anywhere in our program
|
ProfileManager* PROFILEMAN = NULL; // global and accessable from anywhere in our program
|
||||||
@@ -41,7 +42,7 @@ ProfileManager* PROFILEMAN = NULL; // global and accessable from anywhere in our
|
|||||||
|
|
||||||
#define SM_300_STATISTICS_FILE BASE_PATH "statistics.ini"
|
#define SM_300_STATISTICS_FILE BASE_PATH "statistics.ini"
|
||||||
|
|
||||||
#define USER_PROFILES_DIR BASE_PATH "Data" SLASH "UserProfiles" SLASH
|
#define USER_PROFILES_DIR BASE_PATH "Data" SLASH "LocalProfiles" SLASH
|
||||||
#define MACHINE_PROFILE_DIR BASE_PATH "Data" SLASH "MachineProfile" SLASH
|
#define MACHINE_PROFILE_DIR BASE_PATH "Data" SLASH "MachineProfile" SLASH
|
||||||
|
|
||||||
const int CATEGORY_RANKING_VERSION = 4;
|
const int CATEGORY_RANKING_VERSION = 4;
|
||||||
@@ -74,15 +75,15 @@ ProfileManager::~ProfileManager()
|
|||||||
SaveMachineScoresToDisk();
|
SaveMachineScoresToDisk();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileManager::GetMachineProfileIDs( vector<CString> &asProfileIDsOut )
|
void ProfileManager::GetLocalProfileIDs( vector<CString> &asProfileIDsOut )
|
||||||
{
|
{
|
||||||
GetDirListing( USER_PROFILES_DIR "*", asProfileIDsOut, true, false );
|
GetDirListing( USER_PROFILES_DIR "*", asProfileIDsOut, true, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileManager::GetMachineProfileNames( vector<CString> &asNamesOut )
|
void ProfileManager::GetLocalProfileNames( vector<CString> &asNamesOut )
|
||||||
{
|
{
|
||||||
CStringArray vsProfileIDs;
|
CStringArray vsProfileIDs;
|
||||||
GetMachineProfileIDs( vsProfileIDs );
|
GetLocalProfileIDs( vsProfileIDs );
|
||||||
for( unsigned i=0; i<vsProfileIDs.size(); i++ )
|
for( unsigned i=0; i<vsProfileIDs.size(); i++ )
|
||||||
{
|
{
|
||||||
CString sProfileID = vsProfileIDs[i];
|
CString sProfileID = vsProfileIDs[i];
|
||||||
@@ -141,7 +142,7 @@ bool ProfileManager::CreateProfile( CString sProfileDir, CString sName )
|
|||||||
|
|
||||||
bool ProfileManager::LoadDefaultProfileFromMachine( PlayerNumber pn )
|
bool ProfileManager::LoadDefaultProfileFromMachine( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
CString sProfileID = PREFSMAN->m_sDefaultMachineProfileID[pn];
|
CString sProfileID = PREFSMAN->m_sDefaultLocalProfileID[pn];
|
||||||
if( sProfileID.empty() )
|
if( sProfileID.empty() )
|
||||||
{
|
{
|
||||||
m_sProfileDir[pn] = "";
|
m_sProfileDir[pn] = "";
|
||||||
@@ -262,10 +263,9 @@ bool Profile::SaveToIni( CString sIniPath )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProfileManager::CreateMachineProfile( CString sName )
|
bool ProfileManager::CreateLocalProfile( CString sName )
|
||||||
{
|
{
|
||||||
if( sName.empty() )
|
ASSERT( !sName.empty() );
|
||||||
sName = "Machine";
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Find a free directory name in the profiles directory
|
// Find a free directory name in the profiles directory
|
||||||
@@ -296,7 +296,7 @@ bool ProfileManager::CreateMachineProfile( CString sName )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProfileManager::RenameMachineProfile( CString sProfileID, CString sNewName )
|
bool ProfileManager::RenameLocalProfile( CString sProfileID, CString sNewName )
|
||||||
{
|
{
|
||||||
ASSERT( !sProfileID.empty() );
|
ASSERT( !sProfileID.empty() );
|
||||||
|
|
||||||
@@ -316,7 +316,7 @@ bool ProfileManager::RenameMachineProfile( CString sProfileID, CString sNewName
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProfileManager::DeleteMachineProfile( CString sProfileID )
|
bool ProfileManager::DeleteLocalProfile( CString sProfileID )
|
||||||
{
|
{
|
||||||
// delete all files in profile dir
|
// delete all files in profile dir
|
||||||
CString sProfileDir = USER_PROFILES_DIR + sProfileID;
|
CString sProfileDir = USER_PROFILES_DIR + sProfileID;
|
||||||
@@ -423,9 +423,9 @@ void FileWrite(RageFile& f, float fWrite)
|
|||||||
|
|
||||||
void ProfileManager::ReadSongScoresFromFile( CString fn, MemoryCard mc )
|
void ProfileManager::ReadSongScoresFromFile( CString fn, MemoryCard mc )
|
||||||
{
|
{
|
||||||
RageFile f(fn);
|
RageFile f;
|
||||||
if (!f.IsOpen() || f.GetError() != 0)
|
if( !f.Open(fn, RageFile::READ) )
|
||||||
return; /* don't warn if it just doesn't exist */
|
return;
|
||||||
|
|
||||||
int version;
|
int version;
|
||||||
if( !FileRead(f, version) )
|
if( !FileRead(f, version) )
|
||||||
@@ -518,9 +518,9 @@ void ProfileManager::ReadSongScoresFromFile( CString fn, MemoryCard mc )
|
|||||||
|
|
||||||
void ProfileManager::ReadCategoryScoresFromFile( CString fn, MemoryCard mc )
|
void ProfileManager::ReadCategoryScoresFromFile( CString fn, MemoryCard mc )
|
||||||
{
|
{
|
||||||
RageFile f(fn);
|
RageFile f;
|
||||||
if (!f.IsOpen() || f.GetError() != 0)
|
if( !f.Open(fn, RageFile::READ) )
|
||||||
return; /* don't warn if it just doesn't exist */
|
return;
|
||||||
|
|
||||||
int version;
|
int version;
|
||||||
if( !FileRead(f, version) )
|
if( !FileRead(f, version) )
|
||||||
@@ -550,9 +550,9 @@ void ProfileManager::ReadCategoryScoresFromFile( CString fn, MemoryCard mc )
|
|||||||
|
|
||||||
void ProfileManager::ReadCourseScoresFromFile( CString fn, MemoryCard mc )
|
void ProfileManager::ReadCourseScoresFromFile( CString fn, MemoryCard mc )
|
||||||
{
|
{
|
||||||
RageFile f(fn);
|
RageFile f;
|
||||||
if (!f.IsOpen() || f.GetError() != 0)
|
if( !f.Open(fn, RageFile::READ) )
|
||||||
return; /* don't warn if it just doesn't exist */
|
return;
|
||||||
|
|
||||||
int version;
|
int version;
|
||||||
if( !FileRead(f, version) )
|
if( !FileRead(f, version) )
|
||||||
@@ -705,8 +705,8 @@ void ProfileManager::SaveCategoryScoresToFile( CString fn, MemoryCard mc )
|
|||||||
{
|
{
|
||||||
LOG->Trace("SongManager::SaveCategoryRankingsToFile");
|
LOG->Trace("SongManager::SaveCategoryRankingsToFile");
|
||||||
|
|
||||||
RageFile f(fn);
|
RageFile f;
|
||||||
if (!f.IsOpen() || f.GetError() != 0)
|
if( !f.Open(fn, RageFile::WRITE) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FileWrite( f, CATEGORY_RANKING_VERSION );
|
FileWrite( f, CATEGORY_RANKING_VERSION );
|
||||||
@@ -733,8 +733,8 @@ void ProfileManager::SaveCourseScoresToFile( CString fn, MemoryCard mc )
|
|||||||
{
|
{
|
||||||
LOG->Trace("SongManager::SaveCourseScoresToFile");
|
LOG->Trace("SongManager::SaveCourseScoresToFile");
|
||||||
|
|
||||||
RageFile f(fn);
|
RageFile f;
|
||||||
if (!f.IsOpen() || f.GetError() != 0)
|
if( !f.Open(fn, RageFile::WRITE) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FileWrite( f, COURSE_SCORES_VERSION );
|
FileWrite( f, COURSE_SCORES_VERSION );
|
||||||
@@ -789,8 +789,8 @@ void ProfileManager::SaveSongScoresToFile( CString fn, MemoryCard mc )
|
|||||||
{
|
{
|
||||||
LOG->Trace("SongManager::SaveSongScoresToFile %s", fn.c_str());
|
LOG->Trace("SongManager::SaveSongScoresToFile %s", fn.c_str());
|
||||||
|
|
||||||
RageFile f(fn);
|
RageFile f;
|
||||||
if (!f.IsOpen() || f.GetError() != 0)
|
if( !f.Open(fn, RageFile::WRITE) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FileWrite( f, STEPS_SCORES_VERSION );
|
FileWrite( f, STEPS_SCORES_VERSION );
|
||||||
@@ -918,12 +918,7 @@ void ProfileManager::SaveStatsWebPageToFile( CString fn, MemoryCard mc )
|
|||||||
* (Note for testing this: remember that we'll cache directories for a time; this is only slow if
|
* (Note for testing this: remember that we'll cache directories for a time; this is only slow if
|
||||||
* the directory cache expires before we get here.) */
|
* the directory cache expires before we get here.) */
|
||||||
//CString sImagePath = pSong->HasBanner() ? pSong->GetBannerPath() : (pSong->HasBackground() ? pSong->GetBackgroundPath() : "" );
|
//CString sImagePath = pSong->HasBanner() ? pSong->GetBannerPath() : (pSong->HasBackground() ? pSong->GetBackgroundPath() : "" );
|
||||||
CString sImagePath = pSong->GetBannerPath();
|
|
||||||
if( sImagePath.empty() )
|
|
||||||
f.Write( "<td> </td>" );
|
f.Write( "<td> </td>" );
|
||||||
else
|
|
||||||
f.Write( ssprintf("<td><img src=\"%s\" width='120'></td>", HTMLQuoteDoubleQuotes(sImagePath).c_str()) );
|
|
||||||
|
|
||||||
f.Write( ssprintf("<td>%s<br>", pSong->GetTranslitMainTitle().c_str()) );
|
f.Write( ssprintf("<td>%s<br>", pSong->GetTranslitMainTitle().c_str()) );
|
||||||
f.Write( ssprintf("<font size='-1'>%s</font><br>", pSong->GetTranslitSubTitle().c_str()) );
|
f.Write( ssprintf("<font size='-1'>%s</font><br>", pSong->GetTranslitSubTitle().c_str()) );
|
||||||
f.Write( ssprintf("<font size='-1'><i>%s</i></font></td>", pSong->GetTranslitArtist().c_str()) );
|
f.Write( ssprintf("<font size='-1'><i>%s</i></font></td>", pSong->GetTranslitArtist().c_str()) );
|
||||||
|
|||||||
@@ -41,14 +41,14 @@ public:
|
|||||||
ProfileManager();
|
ProfileManager();
|
||||||
~ProfileManager();
|
~ProfileManager();
|
||||||
|
|
||||||
bool CreateMachineProfile( CString sName );
|
bool CreateLocalProfile( CString sName );
|
||||||
bool RenameMachineProfile( CString sProfileID, CString sNewName );
|
bool RenameLocalProfile( CString sProfileID, CString sNewName );
|
||||||
bool DeleteMachineProfile( CString sProfileID );
|
bool DeleteLocalProfile( CString sProfileID );
|
||||||
|
|
||||||
bool CreateMemoryCardProfile( CString sName );
|
bool CreateMemoryCardProfile( CString sName );
|
||||||
|
|
||||||
void GetMachineProfileIDs( vector<CString> &asProfileIDsOut );
|
void GetLocalProfileIDs( vector<CString> &asProfileIDsOut );
|
||||||
void GetMachineProfileNames( vector<CString> &asNamesOut );
|
void GetLocalProfileNames( vector<CString> &asNamesOut );
|
||||||
|
|
||||||
bool LoadFirstAvailableProfile( PlayerNumber pn );
|
bool LoadFirstAvailableProfile( PlayerNumber pn );
|
||||||
bool IsMemoryCardInserted( PlayerNumber pn );
|
bool IsMemoryCardInserted( PlayerNumber pn );
|
||||||
|
|||||||
@@ -53,19 +53,19 @@ ScreenProfileOptions::ScreenProfileOptions( CString sClassName ) : ScreenOptions
|
|||||||
|
|
||||||
g_ProfileOptionsLines[PO_PLAYER1].choices.clear();
|
g_ProfileOptionsLines[PO_PLAYER1].choices.clear();
|
||||||
g_ProfileOptionsLines[PO_PLAYER1].choices.push_back( "-NONE-" );
|
g_ProfileOptionsLines[PO_PLAYER1].choices.push_back( "-NONE-" );
|
||||||
PROFILEMAN->GetMachineProfileNames( g_ProfileOptionsLines[PO_PLAYER1].choices );
|
PROFILEMAN->GetLocalProfileNames( g_ProfileOptionsLines[PO_PLAYER1].choices );
|
||||||
|
|
||||||
g_ProfileOptionsLines[PO_PLAYER2].choices.clear();
|
g_ProfileOptionsLines[PO_PLAYER2].choices.clear();
|
||||||
g_ProfileOptionsLines[PO_PLAYER2].choices.push_back( "-NONE-" );
|
g_ProfileOptionsLines[PO_PLAYER2].choices.push_back( "-NONE-" );
|
||||||
PROFILEMAN->GetMachineProfileNames( g_ProfileOptionsLines[PO_PLAYER2].choices );
|
PROFILEMAN->GetLocalProfileNames( g_ProfileOptionsLines[PO_PLAYER2].choices );
|
||||||
|
|
||||||
g_ProfileOptionsLines[PO_DELETE_].choices.clear();
|
g_ProfileOptionsLines[PO_DELETE_].choices.clear();
|
||||||
g_ProfileOptionsLines[PO_DELETE_].choices.push_back( "-NONE-" );
|
g_ProfileOptionsLines[PO_DELETE_].choices.push_back( "-NONE-" );
|
||||||
PROFILEMAN->GetMachineProfileNames( g_ProfileOptionsLines[PO_DELETE_].choices );
|
PROFILEMAN->GetLocalProfileNames( g_ProfileOptionsLines[PO_DELETE_].choices );
|
||||||
|
|
||||||
g_ProfileOptionsLines[PO_RENAME_].choices.clear();
|
g_ProfileOptionsLines[PO_RENAME_].choices.clear();
|
||||||
g_ProfileOptionsLines[PO_RENAME_].choices.push_back( "-NONE-" );
|
g_ProfileOptionsLines[PO_RENAME_].choices.push_back( "-NONE-" );
|
||||||
PROFILEMAN->GetMachineProfileNames( g_ProfileOptionsLines[PO_RENAME_].choices );
|
PROFILEMAN->GetLocalProfileNames( g_ProfileOptionsLines[PO_RENAME_].choices );
|
||||||
|
|
||||||
if( PREFSMAN->m_sMemoryCardDir[PLAYER_1].empty() )
|
if( PREFSMAN->m_sMemoryCardDir[PLAYER_1].empty() )
|
||||||
g_ProfileOptionsLines[PO_CARD_DIR_1].choices[0] = "-NOT SET IN INI-";
|
g_ProfileOptionsLines[PO_CARD_DIR_1].choices[0] = "-NOT SET IN INI-";
|
||||||
@@ -88,21 +88,21 @@ ScreenProfileOptions::ScreenProfileOptions( CString sClassName ) : ScreenOptions
|
|||||||
void ScreenProfileOptions::ImportOptions()
|
void ScreenProfileOptions::ImportOptions()
|
||||||
{
|
{
|
||||||
vector<CString> vsProfiles;
|
vector<CString> vsProfiles;
|
||||||
PROFILEMAN->GetMachineProfileIDs( vsProfiles );
|
PROFILEMAN->GetLocalProfileIDs( vsProfiles );
|
||||||
|
|
||||||
CStringArray::iterator iter;
|
CStringArray::iterator iter;
|
||||||
|
|
||||||
iter = find(
|
iter = find(
|
||||||
vsProfiles.begin(),
|
vsProfiles.begin(),
|
||||||
vsProfiles.end(),
|
vsProfiles.end(),
|
||||||
PREFSMAN->m_sDefaultMachineProfileID[PLAYER_1] );
|
PREFSMAN->m_sDefaultLocalProfileID[PLAYER_1] );
|
||||||
if( iter != vsProfiles.end() )
|
if( iter != vsProfiles.end() )
|
||||||
m_iSelectedOption[0][PO_PLAYER1] = iter - vsProfiles.begin() + 1;
|
m_iSelectedOption[0][PO_PLAYER1] = iter - vsProfiles.begin() + 1;
|
||||||
|
|
||||||
iter = find(
|
iter = find(
|
||||||
vsProfiles.begin(),
|
vsProfiles.begin(),
|
||||||
vsProfiles.end(),
|
vsProfiles.end(),
|
||||||
PREFSMAN->m_sDefaultMachineProfileID[PLAYER_2] );
|
PREFSMAN->m_sDefaultLocalProfileID[PLAYER_2] );
|
||||||
if( iter != vsProfiles.end() )
|
if( iter != vsProfiles.end() )
|
||||||
m_iSelectedOption[0][PO_PLAYER2] = iter - vsProfiles.begin() + 1;
|
m_iSelectedOption[0][PO_PLAYER2] = iter - vsProfiles.begin() + 1;
|
||||||
}
|
}
|
||||||
@@ -110,17 +110,17 @@ void ScreenProfileOptions::ImportOptions()
|
|||||||
void ScreenProfileOptions::ExportOptions()
|
void ScreenProfileOptions::ExportOptions()
|
||||||
{
|
{
|
||||||
vector<CString> vsProfiles;
|
vector<CString> vsProfiles;
|
||||||
PROFILEMAN->GetMachineProfileIDs( vsProfiles );
|
PROFILEMAN->GetLocalProfileIDs( vsProfiles );
|
||||||
|
|
||||||
if( m_iSelectedOption[0][PO_PLAYER1] > 0 )
|
if( m_iSelectedOption[0][PO_PLAYER1] > 0 )
|
||||||
PREFSMAN->m_sDefaultMachineProfileID[PLAYER_1] = vsProfiles[m_iSelectedOption[0][PO_PLAYER1]-1];
|
PREFSMAN->m_sDefaultLocalProfileID[PLAYER_1] = vsProfiles[m_iSelectedOption[0][PO_PLAYER1]-1];
|
||||||
else
|
else
|
||||||
PREFSMAN->m_sDefaultMachineProfileID[PLAYER_1] = "";
|
PREFSMAN->m_sDefaultLocalProfileID[PLAYER_1] = "";
|
||||||
|
|
||||||
if( m_iSelectedOption[0][PO_PLAYER2] > 0 )
|
if( m_iSelectedOption[0][PO_PLAYER2] > 0 )
|
||||||
PREFSMAN->m_sDefaultMachineProfileID[PLAYER_2] = vsProfiles[m_iSelectedOption[0][PO_PLAYER2]-1];
|
PREFSMAN->m_sDefaultLocalProfileID[PLAYER_2] = vsProfiles[m_iSelectedOption[0][PO_PLAYER2]-1];
|
||||||
else
|
else
|
||||||
PREFSMAN->m_sDefaultMachineProfileID[PLAYER_2] = "";
|
PREFSMAN->m_sDefaultLocalProfileID[PLAYER_2] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenProfileOptions::GoToPrevState()
|
void ScreenProfileOptions::GoToPrevState()
|
||||||
@@ -145,7 +145,7 @@ void ScreenProfileOptions::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
if( !ScreenTextEntry::s_bCancelledLast )
|
if( !ScreenTextEntry::s_bCancelledLast )
|
||||||
{
|
{
|
||||||
CString sNewName = ScreenTextEntry::s_sLastAnswer;
|
CString sNewName = ScreenTextEntry::s_sLastAnswer;
|
||||||
bool bResult = PROFILEMAN->CreateMachineProfile( sNewName );
|
bool bResult = PROFILEMAN->CreateLocalProfile( sNewName );
|
||||||
if( bResult )
|
if( bResult )
|
||||||
SCREENMAN->SetNewScreen( "ScreenProfileOptions" ); // reload
|
SCREENMAN->SetNewScreen( "ScreenProfileOptions" ); // reload
|
||||||
else
|
else
|
||||||
@@ -156,7 +156,7 @@ void ScreenProfileOptions::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
if( !ScreenTextEntry::s_bCancelledLast )
|
if( !ScreenTextEntry::s_bCancelledLast )
|
||||||
{
|
{
|
||||||
CString sNewName = ScreenTextEntry::s_sLastAnswer;
|
CString sNewName = ScreenTextEntry::s_sLastAnswer;
|
||||||
bool bResult = PROFILEMAN->RenameMachineProfile( sProfileID, sNewName );
|
bool bResult = PROFILEMAN->RenameLocalProfile( sProfileID, sNewName );
|
||||||
if( bResult )
|
if( bResult )
|
||||||
SCREENMAN->SetNewScreen( "ScreenProfileOptions" ); // reload
|
SCREENMAN->SetNewScreen( "ScreenProfileOptions" ); // reload
|
||||||
else
|
else
|
||||||
@@ -166,7 +166,7 @@ void ScreenProfileOptions::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
case SM_DoneDeleting:
|
case SM_DoneDeleting:
|
||||||
if( ScreenPrompt::s_bLastAnswer )
|
if( ScreenPrompt::s_bLastAnswer )
|
||||||
{
|
{
|
||||||
bool bResult = PROFILEMAN->DeleteMachineProfile( sProfileID );
|
bool bResult = PROFILEMAN->DeleteLocalProfile( sProfileID );
|
||||||
if( bResult )
|
if( bResult )
|
||||||
SCREENMAN->SetNewScreen( "ScreenProfileOptions" ); // reload
|
SCREENMAN->SetNewScreen( "ScreenProfileOptions" ); // reload
|
||||||
else
|
else
|
||||||
@@ -209,7 +209,7 @@ void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type
|
|||||||
CString ScreenProfileOptions::GetSelectedProfileID()
|
CString ScreenProfileOptions::GetSelectedProfileID()
|
||||||
{
|
{
|
||||||
vector<CString> vsProfiles;
|
vector<CString> vsProfiles;
|
||||||
PROFILEMAN->GetMachineProfileIDs( vsProfiles );
|
PROFILEMAN->GetLocalProfileIDs( vsProfiles );
|
||||||
|
|
||||||
if( m_iSelectedOption[0][m_iCurrentRow[0]]==0 )
|
if( m_iSelectedOption[0][m_iCurrentRow[0]]==0 )
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -837,7 +837,6 @@ int main(int argc, char* argv[])
|
|||||||
SOUNDMAN = new RageSoundManager(PREFSMAN->m_sSoundDrivers);
|
SOUNDMAN = new RageSoundManager(PREFSMAN->m_sSoundDrivers);
|
||||||
SOUNDMAN->SetPrefs(PREFSMAN->m_fSoundVolume);
|
SOUNDMAN->SetPrefs(PREFSMAN->m_fSoundVolume);
|
||||||
SOUND = new RageSounds;
|
SOUND = new RageSounds;
|
||||||
PROFILEMAN = new ProfileManager;
|
|
||||||
BOOKKEEPER = new Bookkeeper;
|
BOOKKEEPER = new Bookkeeper;
|
||||||
LIGHTSMAN = new LightsManager(PREFSMAN->m_sLightsDriver);
|
LIGHTSMAN = new LightsManager(PREFSMAN->m_sLightsDriver);
|
||||||
INPUTFILTER = new InputFilter;
|
INPUTFILTER = new InputFilter;
|
||||||
@@ -848,6 +847,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
/* depends on SONGINDEX: */
|
/* depends on SONGINDEX: */
|
||||||
SONGMAN = new SongManager( loading_window ); // this takes a long time to load
|
SONGMAN = new SongManager( loading_window ); // this takes a long time to load
|
||||||
|
PROFILEMAN = new ProfileManager; // must load after SONGMAN
|
||||||
delete loading_window; // destroy this before init'ing Display
|
delete loading_window; // destroy this before init'ing Display
|
||||||
|
|
||||||
DISPLAY = CreateDisplay();
|
DISPLAY = CreateDisplay();
|
||||||
|
|||||||
Reference in New Issue
Block a user