aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/UPlatformLinux.pas21
1 files changed, 17 insertions, 4 deletions
diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas
index b962d8a5..fe4bbf11 100644
--- a/Game/Code/Classes/UPlatformLinux.pas
+++ b/Game/Code/Classes/UPlatformLinux.pas
@@ -43,7 +43,8 @@ uses
{$ELSE}
oldlinux,
{$ENDIF}
- SysUtils;
+ SysUtils,
+ UConfig;
{$IFDEF FPC_VERSION_2_2_0_PLUS}
Function TPlatformLinux.DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray;
@@ -137,7 +138,11 @@ begin
if FindCmdLineSwitch( cUseLocalPaths ) then
result := ExtractFilePath(ParamStr(0))
else
- result := '/var/log/UltraStarDeluxe/';
+{$IFDEF UseLocalDirs}
+ result := ExtractFilePath(ParamStr(0))
+{$ELSE}
+ result := LogPath+'/';
+{$ENDIF}
end;
function TPlatformLinux.GetGameSharedPath : WideString;
@@ -145,7 +150,11 @@ begin
if FindCmdLineSwitch( cUseLocalPaths ) then
result := ExtractFilePath(ParamStr(0))
else
- result := '/usr/share/UltraStarDeluxe/';
+{$IFDEF UseLocalDirs}
+ result := ExtractFilePath(ParamStr(0))
+{$ELSE}
+ result := SharedPath+'/';
+{$ENDIF}
end;
function TPlatformLinux.GetGameUserPath : WideString;
@@ -153,7 +162,11 @@ begin
if FindCmdLineSwitch( cUseLocalPaths ) then
result := ExtractFilePath(ParamStr(0))
else
- result := get_homedir()+'/.UltraStarDeluxe/';
+{$IFDEF UseLocalDirs}
+ result := ExtractFilePath(ParamStr(0))
+{$ELSE}
+ result := get_homedir()+'/.'+PathSuffix+'/';
+{$ENDIF}
end;
function TPlatformLinux.get_homedir(): string;