aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UPlatformLinux.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-05-03 12:14:10 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-05-03 12:14:10 +0000
commitad4c54706eaab157d975f832aecc836adbef827c (patch)
tree408b927e10eeed11c819d958f4ca538284141721 /Game/Code/Classes/UPlatformLinux.pas
parent4bc80aa3bf2395e9f9954848b74d0033ce982f6b (diff)
downloadusdx-ad4c54706eaab157d975f832aecc836adbef827c.tar.gz
usdx-ad4c54706eaab157d975f832aecc836adbef827c.tar.xz
usdx-ad4c54706eaab157d975f832aecc836adbef827c.zip
- fixed recursive calling of TPlatform.Halt.
- removed oldlinux stuff git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1059 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UPlatformLinux.pas')
-rw-r--r--Game/Code/Classes/UPlatformLinux.pas56
1 files changed, 2 insertions, 54 deletions
diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas
index ff4834fe..b323c608 100644
--- a/Game/Code/Classes/UPlatformLinux.pas
+++ b/Game/Code/Classes/UPlatformLinux.pas
@@ -38,23 +38,17 @@ implementation
uses
libc,
uCommandLine,
-{$IFDEF FPC_VERSION_2_2_0_PLUS}
BaseUnix,
-{$ELSE}
- oldlinux,
-{$ENDIF}
SysUtils,
ULog,
UConfig;
-{$IFDEF FPC_VERSION_2_2_0_PLUS}
-Function TPlatformLinux.DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray;
+function TPlatformLinux.DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray;
var
i : Integer;
TheDir : pDir;
ADirent : pDirent;
Entry : Longint;
- //info : oldlinux.stat;
lAttrib : integer;
begin
i := 0;
@@ -91,52 +85,6 @@ begin
FpCloseDir(TheDir^);
end;
end;
-{$ELSE}
-Function TPlatformLinux.DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray;
-var
- i : Integer;
- TheDir : oldlinux.pdir;
- ADirent : oldlinux.pDirent;
- Entry : Longint;
- info : oldlinux.stat;
- lAttrib : integer;
-begin
- i := 0;
- Filter := LowerCase(Filter);
-
- TheDir := oldlinux.opendir( Dir );
- if Assigned(TheDir) then
- begin
- repeat
- ADirent := oldlinux.ReadDir(TheDir);
-
- If Assigned(ADirent) and (ADirent^.name <> '.') and (ADirent^.name <> '..') then
- begin
- lAttrib := FileGetAttr(Dir + ADirent^.name);
- if ReturnAllSubDirs and ((lAttrib and faDirectory) <> 0) then
- begin
- SetLength( Result, i + 1);
- Result[i].Name := ADirent^.name;
- Result[i].IsDirectory := true;
- Result[i].IsFile := false;
- i := i + 1;
- end
- else if (Length(Filter) = 0) or (Pos( Filter, LowerCase(ADirent^.name)) > 0) then
- begin
- SetLength( Result, i + 1);
- Result[i].Name := ADirent^.name;
- Result[i].IsDirectory := false;
- Result[i].IsFile := true;
- i := i + 1;
- end;
- end;
- until (ADirent = nil);
-
- oldlinux.CloseDir(TheDir);
- end;
-end;
-{$ENDIF}
-
function TPlatformLinux.GetLogPath : WideString;
begin
@@ -198,7 +146,7 @@ end;
// Maybe this should be TPlatformBase.Halt()
procedure TPlatformLinux.Halt;
begin
- halt();
+ System.Halt;
end;
function TPlatformLinux.TerminateIfAlreadyRunning(var WndTitle : String) : Boolean;