[Scummvm-cvs-logs] CVS: scummvm/backends/wince wince.cpp,1.21,1.22 wince.h,1.9,1.10
Max Horn
fingolfin at users.sourceforge.net
Sat Sep 27 09:55:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/backends/wince
In directory sc8-pr-cvs1:/tmp/cvs-serv9425/wince
Modified Files:
wince.cpp wince.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: wince.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- wince.cpp 18 Sep 2003 10:24:53 -0000 1.21
+++ wince.cpp 27 Sep 2003 16:54:10 -0000 1.22
@@ -64,9 +64,6 @@
#define CURRENT_KEYS_VERSION 3
-typedef int (*tTimeCallback)(int);
-typedef void SoundProc(void *param, byte *buf, int len);
-
// Dynamically linked Aygshell
typedef BOOL (*tSHFullScreen)(HWND,DWORD);
//typedef BOOL (WINSHELLAPI *tSHHandleWMSettingChange)(HWND,WPARAM,LPARAM,SHACTIVATEINFO*);
@@ -371,7 +368,7 @@
//OSystem *g_system;
//SoundMixer *g_mixer;
Config *g_config;
-tTimeCallback timer_callback;
+OSystem::TimerProc timer_callback;
int timer_interval;
tSHFullScreen dynamicSHFullScreen = NULL;
@@ -444,7 +441,7 @@
int num_of_dirty_square;
-SoundProc *real_soundproc;
+OSystem::SoundProc real_soundproc;
extern void startFindGame();
extern void displayGameInfo();
@@ -1347,7 +1344,7 @@
return OSystem_WINCE3::create(0, 0);
}
-void OSystem_WINCE3::set_timer(int timer, int (*callback)(int)) {
+void OSystem_WINCE3::set_timer(TimerProc callback, int timer) {
if (!SetTimer(hWnd, 1, timer, NULL))
exit(1);
timer_interval = timer;
@@ -1705,13 +1702,6 @@
Sleep(msecs);
}
-void OSystem_WINCE3::create_thread(ThreadProc *proc, void *param) {
- // needed for emulated MIDI support (Sam'n'Max)
- HANDLE handle;
- handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)proc, param, 0, NULL);
- SetThreadPriority(handle, THREAD_PRIORITY_NORMAL);
-}
-
int mapKey(int key, byte mod)
{
if (key>=VK_F1 && key<=VK_F9) {
@@ -1763,7 +1753,7 @@
memset(samples, 0, len);
}
-bool OSystem_WINCE3::set_sound_proc(SoundProc *proc, void *param, SoundFormat format) {
+bool OSystem_WINCE3::set_sound_proc(SoundProc proc, void *param, SoundFormat format) {
SDL_AudioSpec desired;
/* only one format supported at the moment */
Index: wince.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- wince.h 18 Sep 2003 16:11:56 -0000 1.9
+++ wince.h 27 Sep 2003 16:54:10 -0000 1.10
@@ -50,9 +50,6 @@
#include "SDL.h"
-#include "SDL_audio.h"
-#include "SDL_timer.h"
-#include "SDL_thread.h"
#include "dynamic_imports.h"
@@ -108,15 +105,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);
// Poll cdrom status
// Returns true if cd audio is playing
@@ -132,7 +126,7 @@
void update_cdrom();
// Add a new callback timer
- void set_timer(int timer, int (*callback)(int));
+ void set_timer(TimerProc callback, int timer);
// Quit
void quit();
More information about the Scummvm-git-logs
mailing list