[Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.86,1.87 sdl-common.h,1.38,1.39

Max Horn fingolfin at users.sourceforge.net
Sat Sep 27 09:55:04 CEST 2003


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1:/tmp/cvs-serv9425/sdl

Modified Files:
	sdl-common.cpp sdl-common.h 
Log Message:
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

Index: sdl-common.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- sdl-common.cpp	21 Sep 2003 17:05:07 -0000	1.86
+++ sdl-common.cpp	27 Sep 2003 16:54:10 -0000	1.87
@@ -83,7 +83,7 @@
 	}
 }
 
-void OSystem_SDL_Common::set_timer(int timer, int (*callback)(int)) {
+void OSystem_SDL_Common::set_timer(TimerProc callback, int timer) {
 	SDL_SetTimer(timer, (SDL_TimerCallback) callback);
 }
 
@@ -507,10 +507,6 @@
 	SDL_Delay(msecs);
 }
 
-void OSystem_SDL_Common::create_thread(ThreadProc *proc, void *param) {
-	SDL_CreateThread(proc, param);
-}
-
 static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode)
 {
 	if (key >= SDLK_F1 && key <= SDLK_F9) {
@@ -900,7 +896,7 @@
 	return false;
 }
 
-bool OSystem_SDL_Common::set_sound_proc(SoundProc *proc, void *param, SoundFormat format) {
+bool OSystem_SDL_Common::set_sound_proc(SoundProc proc, void *param, SoundFormat format) {
 	SDL_AudioSpec desired;
 
 	memset(&desired, 0, sizeof(desired));

Index: sdl-common.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/sdl-common.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- sdl-common.h	14 Sep 2003 12:52:37 -0000	1.38
+++ sdl-common.h	27 Sep 2003 16:54:10 -0000	1.39
@@ -28,7 +28,6 @@
 #include "backends/intern.h"
 
 #include <SDL.h>
-#include <SDL_thread.h>
 
 class OSystem_SDL_Common : public OSystem {
 public:
@@ -68,15 +67,12 @@
 	// 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();
 
@@ -100,7 +96,7 @@
 	uint32 property(int param, Property *value);
 
 	// Add a callback timer
-	void set_timer(int timer, int (*callback)(int));
+	void set_timer(TimerProc callback, int timer);
 
 	// Mutex handling
 	MutexRef create_mutex();





More information about the Scummvm-git-logs mailing list