aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UIni.pas
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-11-20 10:40:00 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-11-20 10:40:00 +0000
commitfffb5a40133622131d7077f1d8842c2c6b7b51ad (patch)
tree0beec8c8b7a777e2600d8f976c3fbf032fab0103 /Game/Code/Classes/UIni.pas
parent4f10526633c463675defb42b4d8e27e21105ec21 (diff)
downloadusdx-fffb5a40133622131d7077f1d8842c2c6b7b51ad.tar.gz
usdx-fffb5a40133622131d7077f1d8842c2c6b7b51ad.tar.xz
usdx-fffb5a40133622131d7077f1d8842c2c6b7b51ad.zip
- hide lyrics also by pressing N
- support for more than one song folder - added track number in error.log for duet songs - fixed sorting by title and artist: sort by artist or title first - added more text messages in editor - copy and move lines between tracks in duet songs is possible again - adjust player number in screenname - don't show possible scores in party modes (collidates with some plugins) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2743 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UIni.pas')
-rw-r--r--Game/Code/Classes/UIni.pas32
1 files changed, 30 insertions, 2 deletions
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index d3f912d9..56306ba2 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -214,6 +214,8 @@ var
Modes: PPSDL_Rect;
SR: TSearchRec; //Skin List Patch
found: boolean;
+ txt: string;
+ num: integer;
function GetFileName (S: String):String;
begin
@@ -668,9 +670,29 @@ begin
// SongPath
if (Params.SongPath <> '') then
- SongPath := IncludeTrailingPathDelimiter(Params.SongPath)
+ SongPaths[0] := IncludeTrailingPathDelimiter(Params.SongPath)
else
- SongPath := IncludeTrailingPathDelimiter(IniFile.ReadString('Path', 'Songs', SongPath));
+ begin
+ txt := IniFile.ReadString('Path', 'Songs', ' ');
+ if (DirectoryExists(txt)) then
+ begin
+ num := Length(SongPaths);
+ SetLength(SongPaths, num+1);
+ SongPaths[num] := IncludeTrailingPathDelimiter(txt);
+ end;
+
+ I := 1;
+ repeat
+ txt := IniFile.ReadString('Directories', 'SongDir'+IntToStr(I), ' ');
+ if (DirectoryExists(txt)) then
+ begin
+ num := Length(SongPaths);
+ SetLength(SongPaths, num+1);
+ SongPaths[num] := IncludeTrailingPathDelimiter(txt);
+ Inc(I);
+ end;
+ until (not DirectoryExists(txt));
+ end;
Filename := IniFile.FileName;
IniFile.Free;
@@ -928,6 +950,12 @@ begin
Tekst := ILogSession[Ini.LogSession];
IniFile.WriteString('Advanced', 'LogSession', Tekst);
+ // Directories (add a template if section is missing, from 1.1)
+ if (not IniFile.SectionExists('Path')) then
+ IniFile.WriteString('Path', 'Songs', ' ');
+ if (not IniFile.SectionExists('Directories')) then
+ IniFile.WriteString('Directories', 'SongDir1', ' ');
+
IniFile.Free;
end;
end;