diff options
author | Max Horn | 2003-09-27 16:54:11 +0000 |
---|---|---|
committer | Max Horn | 2003-09-27 16:54:11 +0000 |
commit | 49d2a22b428864ccf2298b67841d4cb3cf33b659 (patch) | |
tree | 11f1ebd799bec7e853bc71671fa045fe9467774c /backends/dc | |
parent | e19e7c879a1fc88458a3e26715875e60512d755b (diff) | |
download | scummvm-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 'backends/dc')
-rw-r--r-- | backends/dc/audio.cpp | 2 | ||||
-rw-r--r-- | backends/dc/dc.h | 9 | ||||
-rw-r--r-- | backends/dc/dcmain.cpp | 5 | ||||
-rw-r--r-- | backends/dc/time.cpp | 2 |
4 files changed, 5 insertions, 13 deletions
diff --git a/backends/dc/audio.cpp b/backends/dc/audio.cpp index 22c1015189..12a66dec9c 100644 --- a/backends/dc/audio.cpp +++ b/backends/dc/audio.cpp @@ -34,7 +34,7 @@ void initSound() do_sound_command(CMD_SET_BUFFER(3)); } -bool OSystem_Dreamcast::set_sound_proc(SoundProc *proc, void *param, SoundFormat format) +bool OSystem_Dreamcast::set_sound_proc(SoundProc proc, void *param, SoundFormat format) { #if SAMPLE_MODE == 0 assert(format == SOUND_16BIT); diff --git a/backends/dc/dc.h b/backends/dc/dc.h index e022976de9..e2839396c6 100644 --- a/backends/dc/dc.h +++ b/backends/dc/dc.h @@ -44,15 +44,12 @@ class OSystem_Dreamcast : public OSystem { // Delay for a specified amount of milliseconds void delay_msecs(uint msecs); - // Create a thread - void create_thread(ThreadProc *proc, void *param); - // Get the next event. // Returns true if an event was retrieved. bool poll_event(Event *event); // Set function that generates samples - bool set_sound_proc(SoundProc *proc, void *param, SoundFormat format); + bool set_sound_proc(SoundProc proc, void *param, SoundFormat format); void clear_sound_proc(); // Poll cdrom status @@ -82,7 +79,7 @@ class OSystem_Dreamcast : public OSystem { void copy_rect_overlay(const int16 *buf, int pitch, int x, int y, int w, int h); // Add a callback timer - virtual void set_timer(int timer, int (*callback)(int)); + virtual void set_timer(TimerProc callback, int timer); // Mutex handling virtual MutexRef create_mutex(); @@ -104,7 +101,7 @@ class OSystem_Dreamcast : public OSystem { int _current_shake_pos, _screen_w, _screen_h; int _overlay_x, _overlay_y; unsigned char *_ms_buf; - SoundProc *_sound_proc; + SoundProc _sound_proc; void *_sound_proc_param; bool _overlay_visible, _overlay_dirty, _screen_dirty; int _screen_buffer, _overlay_buffer, _mouse_buffer; diff --git a/backends/dc/dcmain.cpp b/backends/dc/dcmain.cpp index a9c758a578..bca55bcc25 100644 --- a/backends/dc/dcmain.cpp +++ b/backends/dc/dcmain.cpp @@ -127,11 +127,6 @@ void OSystem_Dreamcast::quit() { exit(0); } -void OSystem_Dreamcast::create_thread(ThreadProc *proc, void *param) { - warning("Creating a thread! (not supported.)\n"); -} - - /* Mutex handling */ OSystem::MutexRef OSystem_Dreamcast::create_mutex() { diff --git a/backends/dc/time.cpp b/backends/dc/time.cpp index d0dda69b8c..3821294238 100644 --- a/backends/dc/time.cpp +++ b/backends/dc/time.cpp @@ -53,7 +53,7 @@ void OSystem_Dreamcast::delay_msecs(uint msecs) get_msecs(); } -void OSystem_Dreamcast::set_timer(int timer, int (*callback)(int)) +void OSystem_Dreamcast::set_timer(TimerProc callback, int timer) { if (callback != NULL) { _timer_duration = timer; |