Backport custom song support. Prefs are CustomSongsEnable, CustomSongsMaxCount, CustomSongsLoadTimeout, CustomSongsMaxSeconds, CustomSongsMaxMegabytes. Metrics are NumProfileSongGroupColors and the colors with it. Profile custom load function is passed PlayerNumber now. Stepmania must run as root to save USB profile scores. (#1470)
This commit is contained in:
+12
-1
@@ -187,6 +187,17 @@ ProfileLoadResult ProfileManager::LoadProfile( PlayerNumber pn, RString sProfile
|
||||
}
|
||||
}
|
||||
|
||||
if(lr == ProfileLoadResult_Success)
|
||||
{
|
||||
Profile* prof= GetProfile(pn);
|
||||
if(prof->m_sDisplayName.empty())
|
||||
{
|
||||
prof->m_sDisplayName= PlayerNumberToLocalizedString(pn);
|
||||
}
|
||||
prof->LoadCustomFunction(sProfileDir, pn);
|
||||
prof->LoadSongsFromDir(sProfileDir, ProfileSlot(pn));
|
||||
}
|
||||
|
||||
LOG->Trace( "Done loading profile - result %d", lr );
|
||||
|
||||
return lr;
|
||||
@@ -211,7 +222,7 @@ bool ProfileManager::LoadLocalProfileFromMachine( PlayerNumber pn )
|
||||
return false;
|
||||
}
|
||||
|
||||
GetProfile(pn)->LoadCustomFunction( m_sProfileDir[pn] );
|
||||
GetProfile(pn)->LoadCustomFunction(m_sProfileDir[pn], pn);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user