Merge in negative-bpm fix
This commit is contained in:
+10
-1
@@ -632,7 +632,15 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
|
||||
out.m_fMusicSampleStartSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
|
||||
|
||||
else if( sValueName.EqualsNoCase("SAMPLELENGTH") )
|
||||
out.m_fMusicSampleLengthSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
|
||||
{
|
||||
float sampleLength = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
|
||||
if (sampleLength > 0 && sampleLength < 1) {
|
||||
// there were multiple versions of this tag allegedly: ensure a decent length if requested.
|
||||
sampleLength *= 1000;
|
||||
}
|
||||
out.m_fMusicSampleLengthSeconds = sampleLength;
|
||||
|
||||
}
|
||||
|
||||
else if( sValueName.EqualsNoCase("FREEZE") )
|
||||
{
|
||||
@@ -735,6 +743,7 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
|
||||
// do nothing. We don't care about this value name
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+13
-1
@@ -42,7 +42,7 @@
|
||||
* @brief The internal version of the cache for StepMania.
|
||||
*
|
||||
* Increment this value to invalidate the current cache. */
|
||||
const int FILE_CACHE_VERSION = 208;
|
||||
const int FILE_CACHE_VERSION = 210;
|
||||
|
||||
/** @brief How long does a song sample last by default? */
|
||||
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
|
||||
@@ -465,6 +465,18 @@ void Song::TidyUpData( bool fromCache, bool /* duringCache */ )
|
||||
FixupPath( m_sBackgroundFile, m_sSongDir );
|
||||
FixupPath( m_sCDTitleFile, m_sSongDir );
|
||||
|
||||
if (this->m_sArtist == "The Dancing Monkeys Project" && this->m_sMainTitle.find_first_of('-') != string::npos)
|
||||
{
|
||||
// Dancing Monkeys had a bug/feature where the artist was replaced. Restore it.
|
||||
vector<RString> titleParts;
|
||||
split(this->m_sMainTitle, "-", titleParts);
|
||||
this->m_sArtist = titleParts.front();
|
||||
Trim(this->m_sArtist);
|
||||
titleParts.erase(titleParts.begin());
|
||||
this->m_sMainTitle = join("-", titleParts);
|
||||
Trim(this->m_sMainTitle);
|
||||
}
|
||||
|
||||
if( !HasMusic() )
|
||||
{
|
||||
vector<RString> arrayPossibleMusic;
|
||||
|
||||
Reference in New Issue
Block a user