aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2014-11-22 21:56:46 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2014-11-22 21:56:46 +0000
commitf81109f575a1e4e36d9c024f90265e01dcf2c354 (patch)
tree25df5ae032991080d4c9bcaa0ab1220969eb9344 /src
parentb6fdd762f9d13f316cd1237d7340a8b38fba796a (diff)
downloadusdx-f81109f575a1e4e36d9c024f90265e01dcf2c354.tar.gz
usdx-f81109f575a1e4e36d9c024f90265e01dcf2c354.tar.xz
usdx-f81109f575a1e4e36d9c024f90265e01dcf2c354.zip
Call LoadSong() only before playing the song. This speeds up the initial load because not all song contents have to be parsed on startup. Thanks to rudi_s.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3100 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/base/USong.pas8
-rw-r--r--src/screens/UScreenSing.pas2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/base/USong.pas b/src/base/USong.pas
index 4f35d774..a8581ebd 100644
--- a/src/base/USong.pas
+++ b/src/base/USong.pas
@@ -623,7 +623,9 @@ begin
Lines[Count].Line[High(Lines[Count].Line)].LastLine := true;
end;
- Result := true;
+ FindRefrain();
+
+ Result := true;
end;
//Load XML Song
@@ -1581,10 +1583,6 @@ begin
//Load Song for Medley Tags
CurrentSong := self;
- Result := Result and LoadSong();
-
- if Result then
- Self.FindRefrain();
finally
SongFile.Free;
end;
diff --git a/src/screens/UScreenSing.pas b/src/screens/UScreenSing.pas
index f26b8cf7..e69e3f56 100644
--- a/src/screens/UScreenSing.pas
+++ b/src/screens/UScreenSing.pas
@@ -770,7 +770,7 @@ begin
if CurrentSong.FileName.GetExtension.ToUTF8 = '.xml' then
success := CurrentSong.AnalyseXML and CurrentSong.LoadXMLSong()
else
- success := CurrentSong.Analyse; // and CurrentSong.LoadSong();
+ success := CurrentSong.Analyse and CurrentSong.LoadSong();
except
success := false;
end;