Add new Sorting Capabilities for Profile list

This commit is contained in:
Crash Cringle
2023-03-13 19:56:07 -07:00
committed by teejusb
parent 4e19ce0d5d
commit f60c1c7f82
15 changed files with 359 additions and 14 deletions
+14
View File
@@ -834,6 +834,20 @@ void GameState::FinishStage()
{
Profile* pProfile = PROFILEMAN->GetProfile(p);
pProfile->m_iCurrentCombo = STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo;
//If the sort order is Recent, move the profile to the top of the list.
if (PREFSMAN->m_ProfileSortOrder == ProfileSortOrder_Recent && PROFILEMAN->IsPersistentProfile(p))
{
int numLocalProfiles = PROFILEMAN->GetNumLocalProfiles();
for (int i = 0; i < numLocalProfiles; i++)
{
Profile *profile = PROFILEMAN->GetLocalProfileFromIndex(i);
if (profile->m_sGuid == pProfile->m_sGuid)
{
PROFILEMAN->MoveProfileTopBottom(i, PREFSMAN->m_bProfileSortOrderAscending);
break;
}
}
}
}
if( m_bDemonstrationOrJukebox )