From 66c8e832dddc45d808e391340420b863a730fe97 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Wed, 10 Oct 2007 22:51:39 +0000 Subject: Fixed a Bug that causes Songfiles name readme or license.txt to appear in the SongChooser, even if they are not SongFiles. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.01@499 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UFiles.pas | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UFiles.pas b/Game/Code/Classes/UFiles.pas index d2883cba..06744271 100644 --- a/Game/Code/Classes/UFiles.pas +++ b/Game/Code/Classes/UFiles.pas @@ -347,20 +347,22 @@ begin end; //Check if all Required Values are given - if (Done <> 15) AND - lWarnIfTagsNotFound then + if (Done <> 15) then begin Result := False; - if (Done and 8) = 0 then //No BPM Flag - Log.LogError('BPM Tag Missing: ' + Song.FileName) - else if (Done and 4) = 0 then //No MP3 Flag - Log.LogError('MP3 Tag/File Missing: ' + Song.FileName) - else if (Done and 2) = 0 then //No Artist Flag - Log.LogError('Artist Tag Missing: ' + Song.FileName) - else if (Done and 1) = 0 then //No Title Flag - Log.LogError('Title Tag Missing: ' + Song.FileName) - else //unknown Error - Log.LogError('File Incomplete or not Ultrastar TxT: ' + Song.FileName); + If lWarnIfTagsNotFound then + begin + if (Done and 8) = 0 then //No BPM Flag + Log.LogError('BPM Tag Missing: ' + Song.FileName) + else if (Done and 4) = 0 then //No MP3 Flag + Log.LogError('MP3 Tag/File Missing: ' + Song.FileName) + else if (Done and 2) = 0 then //No Artist Flag + Log.LogError('Artist Tag Missing: ' + Song.FileName) + else if (Done and 1) = 0 then //No Title Flag + Log.LogError('Title Tag Missing: ' + Song.FileName) + else //unknown Error + Log.LogError('File Incomplete or not Ultrastar TxT: ' + Song.FileName); + end; end; end; -- cgit v1.2.3