aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-01-25 17:03:38 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-01-25 17:03:38 +0000
commit7870ce72a56d56736550376a15e3469fed3afd5d (patch)
tree95c8d1d68a8eca306961c5406102ede737e55a55 /Game/Code/Classes
parent8c8037702011cbcc7f1bdc420ea1430025c573e0 (diff)
downloadusdx-7870ce72a56d56736550376a15e3469fed3afd5d.tar.gz
usdx-7870ce72a56d56736550376a15e3469fed3afd5d.tar.xz
usdx-7870ce72a56d56736550376a15e3469fed3afd5d.zip
Bugfix: some inherited functions were missing.
Jay please check for correctness (did you forget to check your file in?)! git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@804 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UPlatformLinux.pas39
1 files changed, 33 insertions, 6 deletions
diff --git a/Game/Code/Classes/UPlatformLinux.pas b/Game/Code/Classes/UPlatformLinux.pas
index cde737b6..2115428f 100644
--- a/Game/Code/Classes/UPlatformLinux.pas
+++ b/Game/Code/Classes/UPlatformLinux.pas
@@ -15,12 +15,15 @@ type
TPlatformLinux = class(TInterfacedObject, IPlatform)
function get_homedir(): string;
public
- Function DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray; override;
- function TerminateIfAlreadyRunning(var WndTitle : String) : Boolean; override;
-
- function GetLogPath : WideString; override;
- function GetGameSharedPath : WideString; override;
- function GetGameUserPath : WideString; override;
+ function DirectoryFindFiles(Dir, Filter : WideString; ReturnAllSubDirs : Boolean) : TDirectoryEntryArray;
+ function TerminateIfAlreadyRunning(var WndTitle : String) : Boolean;
+ function FindSongFile(Dir, Mask: widestring): widestring;
+
+ procedure Halt;
+
+ function GetLogPath : WideString;
+ function GetGameSharedPath : WideString;
+ function GetGameUserPath : WideString;
end;
implementation
@@ -155,10 +158,34 @@ begin
result := pPasswdEntry^.pw_dir;
end;
+// FIXME: just a dirty-fix to make the linux build work again.
+// This i the same as the corresponding function for windows
+// and MacOSX.
+// Maybe this should be TPlatformBase.Halt()
+procedure TPlatformLinux.Halt;
+begin
+ application.terminate;
+end;
+
function TPlatformLinux.TerminateIfAlreadyRunning(var WndTitle : String) : Boolean;
begin
// Linux and Mac don't check for running apps at the moment
Result := false;
end;
+// FIXME: just a dirty-fix to make the linux build work again.
+// This i the same as the corresponding function for windows
+// (and MacOSX?).
+// Maybe this should be TPlatformBase.FindSongFile()
+function TPlatformLinux.FindSongFile(Dir, Mask: widestring): widestring;
+var
+ SR: TSearchRec; // for parsing song directory
+begin
+ Result := '';
+ if SysUtils.FindFirst(Dir + Mask, faDirectory, SR) = 0 then begin
+ Result := SR.Name;
+ end; // if
+ SysUtils.FindClose(SR);
+end;
+
end.