From 7870ce72a56d56736550376a15e3469fed3afd5d Mon Sep 17 00:00:00 2001 From: tobigun Date: Fri, 25 Jan 2008 17:03:38 +0000 Subject: 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 --- Game/Code/Classes/UPlatformLinux.pas | 39 ++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) (limited to 'Game/Code') 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. -- cgit v1.2.3