aboutsummaryrefslogtreecommitdiff
path: root/backends/wince
diff options
context:
space:
mode:
authorMax Horn2003-09-27 16:54:11 +0000
committerMax Horn2003-09-27 16:54:11 +0000
commit49d2a22b428864ccf2298b67841d4cb3cf33b659 (patch)
tree11f1ebd799bec7e853bc71671fa045fe9467774c /backends/wince
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 'backends/wince')
-rw-r--r--backends/wince/wince.cpp18
-rw-r--r--backends/wince/wince.h10
2 files changed, 6 insertions, 22 deletions
diff --git a/backends/wince/wince.cpp b/backends/wince/wince.cpp
index 86fe31a486..86e3ec8043 100644
--- a/backends/wince/wince.cpp
+++ b/backends/wince/wince.cpp
@@ -64,9 +64,6 @@ typedef struct
#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 @@ extern Scumm *g_scumm;
//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 @@ dirty_square ds[MAX_NUMBER_OF_DIRTY_SQUARES];
int num_of_dirty_square;
-SoundProc *real_soundproc;
+OSystem::SoundProc real_soundproc;
extern void startFindGame();
extern void displayGameInfo();
@@ -1347,7 +1344,7 @@ OSystem *OSystem_WINCE3_create() {
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 @@ void OSystem_WINCE3::delay_msecs(uint msecs) {
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 @@ void own_soundProc(void *buffer, byte *samples, int len) {
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 */
diff --git a/backends/wince/wince.h b/backends/wince/wince.h
index 1c9bb4bd9a..d4cd0660da 100644
--- a/backends/wince/wince.h
+++ b/backends/wince/wince.h
@@ -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 @@ public:
// 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 @@ public:
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();