Profile loading no longer clears out scores for songs that can't be found. Profile merging functions added to ProfileMan and ScreenManageProfiles for profile migration. HighScore operators rewritten to follow good practice.

This commit is contained in:
Kyzentun
2014-11-25 21:37:15 -07:00
parent 1a51b06934
commit a580d54662
9 changed files with 274 additions and 12 deletions
+23
View File
@@ -620,6 +620,29 @@ const Profile* ProfileManager::GetProfile( ProfileSlot slot ) const
}
}
void ProfileManager::MergeLocalProfiles(RString const& from_id, RString const& to_id)
{
Profile* from= GetLocalProfile(from_id);
Profile* to= GetLocalProfile(to_id);
if(from == NULL || to == NULL)
{
return;
}
to->MergeScoresFromOtherProfile(from, false,
LocalProfileIDToDir(from_id), LocalProfileIDToDir(to_id));
}
void ProfileManager::MergeLocalProfileIntoMachine(RString const& from_id, bool skip_totals)
{
Profile* from= GetLocalProfile(from_id);
if(from == NULL)
{
return;
}
GetMachineProfile()->MergeScoresFromOtherProfile(from, skip_totals,
LocalProfileIDToDir(from_id), MACHINE_PROFILE_DIR);
}
//
// General
//