aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/UCommandLine.pas4
-rw-r--r--Game/Code/Classes/URecord.pas10
-rw-r--r--Game/Code/Classes/USongs.pas25
3 files changed, 36 insertions, 3 deletions
diff --git a/Game/Code/Classes/UCommandLine.pas b/Game/Code/Classes/UCommandLine.pas
index 1539ffaf..01ece795 100644
--- a/Game/Code/Classes/UCommandLine.pas
+++ b/Game/Code/Classes/UCommandLine.pas
@@ -2,6 +2,10 @@ unit UCommandLine;
interface
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
{$I switches.inc}
diff --git a/Game/Code/Classes/URecord.pas b/Game/Code/Classes/URecord.pas
index 87c35cd8..29a9d7f9 100644
--- a/Game/Code/Classes/URecord.pas
+++ b/Game/Code/Classes/URecord.pas
@@ -323,6 +323,16 @@ begin
BASS_RecordInit(SC);
InputName := BASS_RecordGetInputName(SCI);
+
+ {$IFDEF DARWIN}
+ // Under MacOSX the SingStar Mics have an empty
+ // InputName. So, we have to add a hard coded
+ // Workaround for this problem
+ if (InputName = nil) and (Pos( 'USBMIC Serial#', Descr) > 0) then
+ begin
+ InputName := 'Microphone';
+ end;
+ {$ENDIF}
SetLength(SoundCard[SC].Input, 1);
SoundCard[SC].Input[SCI].Name := InputName;
diff --git a/Game/Code/Classes/USongs.pas b/Game/Code/Classes/USongs.pas
index a04c1032..9b9ab7bb 100644
--- a/Game/Code/Classes/USongs.pas
+++ b/Game/Code/Classes/USongs.pas
@@ -8,6 +8,12 @@ interface
{$I switches.inc}
+{$IFDEF DARWIN}
+ {$IFDEF DEBUG}
+ {$DEFINE USE_PSEUDO_THREAD}
+ {$ENDIF}
+{$ENDIF}
+
uses
{$IFDEF MSWINDOWS}
Windows,
@@ -30,6 +36,9 @@ uses
{$IFDEF DARWIN}
cthreads,
{$ENDIF}
+ {$IFDEF USE_PSEUDO_THREAD}
+ PseudoThread,
+ {$ENDIF}
UCatCovers;
type
@@ -86,8 +95,13 @@ type
OrderTyp: integer; // type of sorting for this button (0=name)
CatNumber: integer; // Count of Songs in Category for Cats and Number of Song in Category for Songs
end;
-
+
+
+ {$IFDEF USE_PSEUDO_THREAD}
+ TSongs = class( TPseudoThread )
+ {$ELSE}
TSongs = class( TThread )
+ {$ENDIF}
private
BrowsePos : Cardinal; //Actual Pos in Song Array
fNotify ,
@@ -204,7 +218,9 @@ begin
*)
{$endif}
- Setlength(Song, 0);
+{$IFNDEF USE_PSEUDO_THREAD}
+ Setlength(Song, 0);
+{$ENDIF}
end;
procedure TSongs.DoDirChanged(Sender: TObject);
@@ -216,6 +232,9 @@ procedure TSongs.Execute();
var
fChangeNotify : THandle;
begin
+{$IFDEF USE_PSEUDO_THREAD}
+ int_LoadSongList();
+{$ELSE}
fParseSongDirectory := true;
while not self.terminated do
@@ -229,7 +248,7 @@ begin
self.suspend;
end;
-
+{$ENDIF}
end;
procedure TSongs.int_LoadSongList;