From 6fa012e73a04959d69307911b90f526148c8352a Mon Sep 17 00:00:00 2001 From: jaybinks Date: Mon, 4 Feb 2008 23:10:16 +0000 Subject: small changes to check linux compilation. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@808 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UPlatformLinux.pas | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas index 2115428f..882376a2 100644 --- a/Game/Code/Classes/UPlatformLinux.pas +++ b/Game/Code/Classes/UPlatformLinux.pas @@ -128,7 +128,7 @@ end; function TPlatformLinux.GetLogPath : WideString; begin if FindCmdLineSwitch( cUseLocalPaths ) then - result := inherited + result := ExtractFilePath(ParamStr(0)) else result := '/var/log/UltraStarDeluxe/'; end; @@ -136,7 +136,7 @@ end; function TPlatformLinux.GetGameSharedPath : WideString; begin if FindCmdLineSwitch( cUseLocalPaths ) then - result := inherited + result := ExtractFilePath(ParamStr(0)) else result := '/usr/share/UltraStarDeluxe/'; end; @@ -144,7 +144,7 @@ end; function TPlatformLinux.GetGameUserPath : WideString; begin if FindCmdLineSwitch( cUseLocalPaths ) then - result := inherited + result := ExtractFilePath(ParamStr(0)) else result := get_homedir()+'/.UltraStarDeluxe/'; end; @@ -164,7 +164,7 @@ end; // Maybe this should be TPlatformBase.Halt() procedure TPlatformLinux.Halt; begin - application.terminate; + halt(); end; function TPlatformLinux.TerminateIfAlreadyRunning(var WndTitle : String) : Boolean; @@ -182,7 +182,8 @@ var SR: TSearchRec; // for parsing song directory begin Result := ''; - if SysUtils.FindFirst(Dir + Mask, faDirectory, SR) = 0 then begin + if SysUtils.FindFirst(Dir + Mask, faDirectory, SR) = 0 then + begin Result := SR.Name; end; // if SysUtils.FindClose(SR); -- cgit v1.2.3