save ProductID in HighScore to track what software a score came from
This commit is contained in:
@@ -58,6 +58,7 @@ XNode* HighScore::CreateNode() const
|
|||||||
pNode->AppendChild( "Time", (int)time );
|
pNode->AppendChild( "Time", (int)time );
|
||||||
pNode->AppendChild( "PlayerGuid", sPlayerGuid );
|
pNode->AppendChild( "PlayerGuid", sPlayerGuid );
|
||||||
pNode->AppendChild( "MachineGuid", sMachineGuid );
|
pNode->AppendChild( "MachineGuid", sMachineGuid );
|
||||||
|
pNode->AppendChild( "ProductID", iProductID );
|
||||||
|
|
||||||
return pNode;
|
return pNode;
|
||||||
}
|
}
|
||||||
@@ -87,6 +88,7 @@ void HighScore::LoadFromNode( const XNode* pNode )
|
|||||||
else if( (*child)->name == "Time" ) (*child)->GetValue( (int&)time );
|
else if( (*child)->name == "Time" ) (*child)->GetValue( (int&)time );
|
||||||
else if( (*child)->name == "PlayerGuid" ) (*child)->GetValue( sPlayerGuid );
|
else if( (*child)->name == "PlayerGuid" ) (*child)->GetValue( sPlayerGuid );
|
||||||
else if( (*child)->name == "MachineGuid" ) (*child)->GetValue( sMachineGuid );
|
else if( (*child)->name == "MachineGuid" ) (*child)->GetValue( sMachineGuid );
|
||||||
|
else if( (*child)->name == "ProductID" ) (*child)->GetValue( iProductID );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Validate input. */
|
/* Validate input. */
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ struct HighScore
|
|||||||
time_t time; // return value of time() when screenshot was taken
|
time_t time; // return value of time() when screenshot was taken
|
||||||
CString sPlayerGuid; // who made this high score
|
CString sPlayerGuid; // who made this high score
|
||||||
CString sMachineGuid; // where this high score was made
|
CString sMachineGuid; // where this high score was made
|
||||||
|
int iProductID;
|
||||||
|
|
||||||
HighScore() { Unset(); }
|
HighScore() { Unset(); }
|
||||||
void Unset()
|
void Unset()
|
||||||
@@ -40,6 +40,7 @@ struct HighScore
|
|||||||
time = 0;
|
time = 0;
|
||||||
sPlayerGuid = "";
|
sPlayerGuid = "";
|
||||||
sMachineGuid = "";
|
sMachineGuid = "";
|
||||||
|
iProductID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator>=( const HighScore& other ) const;
|
bool operator>=( const HighScore& other ) const;
|
||||||
@@ -55,6 +56,7 @@ struct HighScore
|
|||||||
COMPARE( time );
|
COMPARE( time );
|
||||||
COMPARE( sPlayerGuid );
|
COMPARE( sPlayerGuid );
|
||||||
COMPARE( sMachineGuid );
|
COMPARE( sMachineGuid );
|
||||||
|
COMPARE( iProductID );
|
||||||
#undef COMPARE
|
#undef COMPARE
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -298,6 +298,7 @@ void PrefsManager::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_sMemoryCardProfileSubdir = PRODUCT_NAME;
|
m_sMemoryCardProfileSubdir = PRODUCT_NAME;
|
||||||
|
m_iProductID = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrefsManager::~PrefsManager()
|
PrefsManager::~PrefsManager()
|
||||||
@@ -507,6 +508,7 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
|||||||
ini.GetValue( "Options", "DisableScreenSaver", m_bDisableScreenSaver );
|
ini.GetValue( "Options", "DisableScreenSaver", m_bDisableScreenSaver );
|
||||||
|
|
||||||
ini.GetValue( "Options", "MemoryCardProfileSubdir", m_sMemoryCardProfileSubdir );
|
ini.GetValue( "Options", "MemoryCardProfileSubdir", m_sMemoryCardProfileSubdir );
|
||||||
|
ini.GetValue( "Options", "ProductID", m_iProductID );
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
ini.GetValue( "Options", ssprintf("DefaultLocalProfileIDP%d",p+1), m_sDefaultLocalProfileID[p] );
|
ini.GetValue( "Options", ssprintf("DefaultLocalProfileIDP%d",p+1), m_sDefaultLocalProfileID[p] );
|
||||||
@@ -733,6 +735,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
ini.SetValue( "Options", "DisableScreenSaver", m_bDisableScreenSaver );
|
ini.SetValue( "Options", "DisableScreenSaver", m_bDisableScreenSaver );
|
||||||
|
|
||||||
ini.SetValue( "Options", "MemoryCardProfileSubdir", m_sMemoryCardProfileSubdir );
|
ini.SetValue( "Options", "MemoryCardProfileSubdir", m_sMemoryCardProfileSubdir );
|
||||||
|
ini.SetValue( "Options", "ProductID", m_iProductID );
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
ini.SetValue( "Options", ssprintf("DefaultLocalProfileIDP%d",p+1), m_sDefaultLocalProfileID[p] );
|
ini.SetValue( "Options", ssprintf("DefaultLocalProfileIDP%d",p+1), m_sDefaultLocalProfileID[p] );
|
||||||
@@ -796,4 +799,3 @@ void PrefsManager::ResetToFactoryDefaults()
|
|||||||
SaveGlobalPrefsToDisk();
|
SaveGlobalPrefsToDisk();
|
||||||
m_bFirstRun = false;
|
m_bFirstRun = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ public:
|
|||||||
bool m_bDisableScreenSaver;
|
bool m_bDisableScreenSaver;
|
||||||
CString m_sLanguage;
|
CString m_sLanguage;
|
||||||
CString m_sMemoryCardProfileSubdir; // the directory on a memory card to look in for a profile
|
CString m_sMemoryCardProfileSubdir; // the directory on a memory card to look in for a profile
|
||||||
|
int m_iProductID; // Saved in HighScore to track what software version a score came from.
|
||||||
CString m_sDefaultLocalProfileID[NUM_PLAYERS];
|
CString m_sDefaultLocalProfileID[NUM_PLAYERS];
|
||||||
CString m_sMemoryCardOsMountPoint[NUM_PLAYERS]; // if set, always use the device that mounts to this point
|
CString m_sMemoryCardOsMountPoint[NUM_PLAYERS]; // if set, always use the device that mounts to this point
|
||||||
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
|
||||||
|
|||||||
@@ -898,6 +898,7 @@ void ScreenEvaluation::CommitScores(
|
|||||||
hs.time = time(NULL);
|
hs.time = time(NULL);
|
||||||
hs.sPlayerGuid = PROFILEMAN->IsUsingProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : "";
|
hs.sPlayerGuid = PROFILEMAN->IsUsingProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : "";
|
||||||
hs.sMachineGuid = PROFILEMAN->GetMachineProfile()->m_sGuid;
|
hs.sMachineGuid = PROFILEMAN->GetMachineProfile()->m_sGuid;
|
||||||
|
hs.iProductID = PREFSMAN->m_iProductID;
|
||||||
|
|
||||||
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user