aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authoreddie-0815 <eddie-0815@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-02 18:40:41 +0000
committereddie-0815 <eddie-0815@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-02 18:40:41 +0000
commit7707816349d4bd2a14e9140e85c65f0bfd713718 (patch)
tree8efcf44f3d9918afd7f654240df85f31529965c0 /Game/Code/Classes
parentbb1af96ecfcb42631137136f8f90b6780039e15f (diff)
downloadusdx-7707816349d4bd2a14e9140e85c65f0bfd713718.tar.gz
usdx-7707816349d4bd2a14e9140e85c65f0bfd713718.tar.xz
usdx-7707816349d4bd2a14e9140e85c65f0bfd713718.zip
Fixed MacOSX version. Can we use baseunix on linux? We could drop oldlinux then (not available on the mac).
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@555 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UMain.pas1
-rw-r--r--Game/Code/Classes/USongs.pas36
2 files changed, 22 insertions, 15 deletions
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index fa4c45b5..e4acf4aa 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -145,7 +145,6 @@ uses USongs, UJoystick, math, UCommandLine, ULanguage, SDL_ttf,
const
Version = 'UltraStar Deluxe V 1.10 Alpha Build';
-//{$IFDEF WIN32}
Procedure Main;
var
WndTitle: string;
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas
index 2eeeec87..7fd58034 100644
--- a/Game/Code/Classes/USongs.pas
+++ b/Game/Code/Classes/USongs.pas
@@ -9,19 +9,17 @@ interface
{$I switches.inc}
uses
- {$ifndef MSWINDOWS}
- {$IFDEF DARWIN}
- baseunix,
- {$ELSE}
+ {$IFDEF MSWINDOWS}
+ Windows,
+ DirWatch,
+ {$ELSE}
+ {$IFNDEF DARWIN}
oldlinux,
+ syscall,
{$ENDIF}
baseunix,
UnixType,
- syscall,
- {$else}
- windows,
- DirWatch,
- {$endif}
+ {$ENDIF}
SysUtils,
Classes,
ULog,
@@ -91,7 +89,7 @@ type
fWatch : longint;
fParseSongDirectory : boolean;
fProcessing : boolean;
- {$ifdef win32}
+ {$ifdef MSWINDOWS}
fDirWatch : TDirectoryWatch;
{$endif}
procedure int_LoadSongList;
@@ -169,7 +167,7 @@ begin
inherited create( false );
self.freeonterminate := true;
- {$IFDEF Win32}
+ {$IFDEF MSWINDOWS}
fDirWatch := TDirectoryWatch.create(nil);
fDirWatch.OnChange := DoDirChanged;
fDirWatch.Directory := SongPath;
@@ -206,7 +204,7 @@ end;
procedure TSongs.DoDirChanged(Sender: TObject);
begin
- LoadSongList();
+ LoadSongList();
end;
procedure TSongs.Execute();
@@ -284,12 +282,22 @@ var
{$ifdef MSWINDOWS}
SR: TSearchRecW; // for parsing Songs Directory
- {$else} // This should work on all posix systems.
+ {$ENDIF}
+
+ // eddie: can we merge that? is baseunix working on linux? oldlinux is
+ // not available on mac os x.
+ {$IFDEF LINUX}
TheDir : oldlinux.pdir;
ADirent : oldlinux.pDirent;
Entry : Longint;
info : oldlinux.stat;
- {$endif}
+ {$ENDIF}
+ {$IFDEF DARWIN}
+ TheDir : pdir;
+ ADirent : pDirent;
+ Entry : Longint;
+ info : stat;
+ {$ENDIF}
begin
{$ifdef MSWINDOWS}
if FindFirstW(Dir + '*', faDirectory, SR) = 0 then // JB_Unicode - windows