aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/MacOSX/Wrapper/PseudoThread.pas
diff options
context:
space:
mode:
authormogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-13 19:58:44 +0000
committermogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-13 19:58:44 +0000
commit949fea202f6c963ad6c8a40040e1e9e6f909161b (patch)
tree9f6f683d203d55e41e5b7483b4038103d471ce76 /Game/Code/MacOSX/Wrapper/PseudoThread.pas
parent1a7da68ae6e1368dae25821b15318bd1d2d9f88e (diff)
parentefe5b06fd5715f550334692d28c2218896b62ce1 (diff)
downloadusdx-949fea202f6c963ad6c8a40040e1e9e6f909161b.tar.gz
usdx-949fea202f6c963ad6c8a40040e1e9e6f909161b.tar.xz
usdx-949fea202f6c963ad6c8a40040e1e9e6f909161b.zip
First multi platform version, works on Linux and Windows
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.1@855 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/MacOSX/Wrapper/PseudoThread.pas')
-rwxr-xr-xGame/Code/MacOSX/Wrapper/PseudoThread.pas48
1 files changed, 48 insertions, 0 deletions
diff --git a/Game/Code/MacOSX/Wrapper/PseudoThread.pas b/Game/Code/MacOSX/Wrapper/PseudoThread.pas
new file mode 100755
index 00000000..d81a5cfe
--- /dev/null
+++ b/Game/Code/MacOSX/Wrapper/PseudoThread.pas
@@ -0,0 +1,48 @@
+unit PseudoThread;
+
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
+{$I switches.inc}
+
+interface
+
+type
+
+ // Debugging threads with XCode doesn't seem to work.
+ // We use PseudoThread in Debug mode to get proper debugging.
+ TPseudoThread = class(TObject)
+ private
+ protected
+ Terminated,
+ FreeOnTerminate : Boolean;
+ procedure Execute; virtual; abstract;
+ procedure Resume;
+ procedure Suspend;
+ public
+ constructor Create(const suspended : Boolean);
+ end;
+
+implementation
+
+{ TPseudoThread }
+
+constructor TPseudoThread.Create(const suspended : Boolean);
+begin
+ if not suspended then begin
+ Execute;
+ end;
+end;
+
+procedure TPseudoThread.Resume;
+begin
+ Execute;
+end;
+
+procedure TPseudoThread.Suspend;
+begin
+end;
+
+end.
+