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/morphos/morphos.cpp | |
| 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/morphos/morphos.cpp')
| -rw-r--r-- | backends/morphos/morphos.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp index d565a57d6c..c98a8d305d 100644 --- a/backends/morphos/morphos.cpp +++ b/backends/morphos/morphos.cpp @@ -97,7 +97,6 @@ OSystem_MorphOS::OSystem_MorphOS(SCALERTYPE gfx_mode, bool full_screen) ScummScreenBuffer[1] = NULL; ScummRenderTo = NULL; ScummNoCursor = NULL; - ScummMusicThread = NULL; ScummSoundThread = NULL; ScummWinX = -1; ScummWinY = -1; @@ -323,24 +322,11 @@ void OSystem_MorphOS::delay_msecs(uint msecs) TimeDelay(UNIT_MICROHZ, 0, msecs*1000); } -void OSystem_MorphOS::set_timer(int timer, int (*callback)(int)) +void OSystem_MorphOS::set_timer(TimerProc callback, int timer) { warning("set_timer() unexpectedly called"); } -void OSystem_MorphOS::create_thread(ThreadProc *proc, void *param) -{ - MusicStartup.mn_Node.ln_Type = NT_MESSAGE; - MusicStartup.mn_ReplyPort = ThreadPort; - MusicStartup.mn_Length = sizeof(MusicStartup); - - ScummMusicThread = CreateNewProcTags(NP_Entry, (ULONG) proc, NP_CodeType, CODETYPE_PPC, - NP_Name, (ULONG) "ScummVM Music Thread", - NP_Priority, 40, NP_StackSize, 32000, - NP_StartupMsg, &MusicStartup, - NP_PPC_Arg1, (ULONG) param, TAG_DONE); -} - OSystem::MutexRef OSystem_MorphOS::create_mutex() { SignalSemaphore *sem = (SignalSemaphore *) AllocVec(sizeof (SignalSemaphore), MEMF_PUBLIC); @@ -518,13 +504,6 @@ void OSystem_MorphOS::quit() { int num_threads = 0; - if (ScummMusicThread) - { - num_threads++; - Signal((Task *) ScummMusicThread, SIGBREAKF_CTRL_C); - ScummMusicThread = NULL; - } - if (ScummSoundThread) { num_threads++; @@ -532,6 +511,8 @@ void OSystem_MorphOS::quit() ScummSoundThread = NULL; } + // TODO: this code could probably greatly simplified now that there is + // only one thread left... while (num_threads > 0) { Message* msg; @@ -1463,7 +1444,7 @@ void OSystem_MorphOS::set_mouse_cursor(const byte *buf, uint w, uint h, int hots UndrawMouse(); } -bool OSystem_MorphOS::set_sound_proc(OSystem::SoundProc *proc, void *param, OSystem::SoundFormat format) +bool OSystem_MorphOS::set_sound_proc(OSystem::SoundProc proc, void *param, OSystem::SoundFormat format) { if (ScummSoundThread) { |
