aboutsummaryrefslogtreecommitdiff
path: root/common/system.h
diff options
context:
space:
mode:
authorMax Horn2003-09-27 16:54:11 +0000
committerMax Horn2003-09-27 16:54:11 +0000
commit49d2a22b428864ccf2298b67841d4cb3cf33b659 (patch)
tree11f1ebd799bec7e853bc71671fa045fe9467774c /common/system.h
parente19e7c879a1fc88458a3e26715875e60512d755b (diff)
downloadscummvm-rg350-49d2a22b428864ccf2298b67841d4cb3cf33b659.tar.gz
scummvm-rg350-49d2a22b428864ccf2298b67841d4cb3cf33b659.tar.bz2
scummvm-rg350-49d2a22b428864ccf2298b67841d4cb3cf33b659.zip
OSystem changes: removed create_thread() method (not needed anymore; 'pure' threads aren't very portable anyway, better we only use timers); introduced OSystem::TimerProc type
svn-id: r10430
Diffstat (limited to 'common/system.h')
-rw-r--r--common/system.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/common/system.h b/common/system.h
index e59bbe4632..4da287e980 100644
--- a/common/system.h
+++ b/common/system.h
@@ -33,15 +33,14 @@
* and use it to interact with the system.
*
* In particular, a backend provides a video surface for ScummVM to draw in;
- * methods to create threads and timers, to handle user input events,
+ * methods to create timers, to handle user input events,
* control audio CD playback, and sound output.
*/
class OSystem {
public:
typedef struct Mutex *MutexRef;
- typedef int ThreadProc(void *param);
- typedef void SoundProc(void *param, byte *buf, int len);
- //typedef int TimerProc(int interval);
+ typedef void (*SoundProc)(void *param, byte *buf, int len);
+ typedef int (*TimerProc)(int interval);
/**
* The types of events backends can generate.
@@ -213,7 +212,7 @@ public:
- /** @name Events and Threads */
+ /** @name Events and Time */
//@{
/** Get the number of milliseconds since the program was started. */
@@ -222,16 +221,8 @@ public:
/** Delay/sleep for the specified amount of milliseconds. */
virtual void delay_msecs(uint msecs) = 0;
- /**
- * Create a thread with the given entry procedure.
- * @param proc the thread main procedure
- * @param param an arbitrary parameter which is stored and passed to proc
- * @return
- */
- virtual void create_thread(ThreadProc *proc, void *param) = 0;
-
- /** Add a new callback timer. */
- virtual void set_timer(int timer, int (*callback)(int)) = 0;
+ /** Set the timer callback. */
+ virtual void set_timer(TimerProc callback, int interval) = 0;
/**
* Get the next event in the event queue.
@@ -253,7 +244,7 @@ public:
* @param param an arbitrary parameter which is stored and passed to proc.
* @param format the sample type format.
*/
- virtual bool set_sound_proc(SoundProc *proc, void *param, SoundFormat format) = 0;
+ virtual bool set_sound_proc(SoundProc proc, void *param, SoundFormat format) = 0;
/**
* Remove any audio callback previously set via set_sound_proc, thus effectively