aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/USongs.pas
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/USongs.pas9
1 files changed, 7 insertions, 2 deletions
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas
index 3ac32dda..31db883d 100644
--- a/Game/Code/Classes/USongs.pas
+++ b/Game/Code/Classes/USongs.pas
@@ -265,7 +265,10 @@ begin
BrowsePos := 0;
// browse directories
BrowseDir(SongPath);
-
+
+ if UserSongPath <> SongPath then
+ BrowseDir(UserSongPath);
+
//Set Correct SongArray Length
SetLength(Song, BrowsePos);
@@ -306,6 +309,7 @@ var
i : Integer;
Files : TDirectoryEntryArray;
begin
+
Files := Platform.DirectoryFindFiles( Dir, '.txt', true);
for i := 0 to Length(Files)-1 do
begin
@@ -318,7 +322,8 @@ begin
SLen := BrowsePos;
Song[SLen].Path := Dir;
- Song[SLen].Folder := Copy(Dir, Length(SongPath)+1, 10000);
+// Song[SLen].Folder := Copy(Dir, Length(SongPath)+1, 10000);
+ Song[SLen].Folder := Copy(Dir, Length(Dir)+1, 10000);
Song[SLen].Folder := Copy(Song[SLen].Folder, 1, Pos( PathDelim , Song[SLen].Folder)-1);
Song[SLen].FileName := Files[i].Name;