From 337297f4b685aead4201b7ed8fd53ea4e1eabca3 Mon Sep 17 00:00:00 2001 From: Kyzentun Keeslala Date: Sun, 11 Oct 2015 13:54:13 -0600 Subject: [PATCH] Changed blank music file check in Song::LoadFromSongDir to allow a blank music file if the song uses keysounds. The intent is to prevent bms files from triggering the condition, so they don't have to hit the song folder every time during loading. --- Docs/Changelog_sm5.txt | 9 +++++++++ src/Song.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index b019125b16..fdbd497cdc 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -4,6 +4,15 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt. ________________________________________________________________________________ +2015/10/11 +---------- +* [Song] Changed song loading to allow a song to have a blank MusicFile field + if the song has any keysounds. A blank MusicFile entry can result from + having '#' in the music file name, or be intended for bms files. Do not use + '#' in any fields, the .sm and .ssc file formats do not support it. The + engine has to detect that the field was loaded blank and look through the + song folder to figure out what was supposed to be there. [kyzentun] + 2015/10/09 ---------- * [Edit Mode] Changed Current Second field to not have the global offset diff --git a/src/Song.cpp b/src/Song.cpp index 0434b06f46..3ef6a5532d 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -316,7 +316,7 @@ bool Song::LoadFromSongDir( RString sDir, bool load_autosave ) loaderSM.LoadFromSimfile( sCacheFilePath, *this, true ); loaderSM.TidyUpData( *this, true ); } - if(m_sMainTitle == "" || m_sMusicFile == "") + if(m_sMainTitle == "" || (m_sMusicFile == "" && m_vsKeysoundFile.empty())) { LOG->Warn("Main title or music file for '%s' came up blank, forced to fall back on TidyUpData to fix title and paths. Do not use # or ; in a song title.", m_sSongDir.c_str()); // Tell TidyUpData that it's not loaded from the cache because it needs