[Scummvm-cvs-logs] CVS: scummvm/backends/wince pocketpc.cpp,1.6,1.7
Nicolas Bacca
arisme at users.sourceforge.net
Thu Oct 24 22:47:01 CEST 2002
Update of /cvsroot/scummvm/scummvm/backends/wince
In directory usw-pr-cvs1:/tmp/cvs-serv22532
Modified Files:
pocketpc.cpp
Log Message:
Re-enable GameX (license ok), static link to mini-SDL & remove old GUI from project
Index: pocketpc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/pocketpc.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pocketpc.cpp 22 Oct 2002 23:43:00 -0000 1.6
+++ pocketpc.cpp 24 Oct 2002 22:06:00 -0000 1.7
@@ -50,9 +50,8 @@
#include "dynamic_imports.h"
#if defined(MIPS) || defined(SH3)
-#if 0
-#define GAMEX
-#endif
+// Comment this out if you don't want to support GameX
+#define GAMEX
#endif
#ifdef GAMEX
@@ -73,12 +72,13 @@
//typedef BOOL (WINSHELLAPI *tSHHandleWMSettingChange)(HWND,WPARAM,LPARAM,SHACTIVATEINFO*);
typedef BOOL (*tSHSipPreference)(HWND,SIPSTATE);
+/*
// Dynamically linked SDLAudio
typedef void (*tSDL_AudioQuit)(void);
typedef int (*tSDL_Init)(Uint32);
typedef void (*tSDL_PauseAudio)(int);
typedef int (*tSDL_OpenAudio)(SDL_AudioSpec*, SDL_AudioSpec*);
-
+*/
// GAPI "emulation"
typedef struct pseudoGAPI {
@@ -130,6 +130,8 @@
/* Default SDLAUDIO */
+/*
+
void defaultSDL_AudioQuit() {
}
@@ -144,6 +146,8 @@
return 0;
}
+*/
+
/* Default AYGSHELL */
BOOL defaultSHFullScreen(HWND handle, DWORD action) {
@@ -320,10 +324,6 @@
tSHFullScreen dynamicSHFullScreen = NULL;
//tSHHandleWMSettingChange dynamicSHHandleWMSettingChange = NULL;
tSHSipPreference dynamicSHSipPreference = NULL;
-tSDL_AudioQuit dynamicSDL_AudioQuit = NULL;
-tSDL_Init dynamicSDL_Init = NULL;
-tSDL_PauseAudio dynamicSDL_PauseAudio = NULL;
-tSDL_OpenAudio dynamicSDL_OpenAudio = NULL;
tGXOpenInput dynamicGXOpenInput = NULL;
tGXGetDefaultKeys dynamicGXGetDefaultKeys = NULL;
tGXCloseDisplay dynamicGXCloseDisplay = NULL;
@@ -588,7 +588,7 @@
dynamicSHFullScreen(hWnd_Window, SHFS_SHOWTASKBAR | SHFS_SHOWSIPBUTTON | SHFS_SHOWSTARTICON);
dynamicGXCloseInput();
dynamicGXCloseDisplay();
- dynamicSDL_AudioQuit();
+ SDL_AudioQuit();
UpdateWindow(hWnd_Window);
closing = true;
}
@@ -637,7 +637,7 @@
bool need_rescan = false;
HMODULE aygshell_handle;
- HMODULE SDLAudio_handle;
+ //HMODULE SDLAudio_handle;
HMODULE GAPI_handle;
hide_toolbar = false;
@@ -655,22 +655,6 @@
//dynamicSHHandleWMSettingChange = defaultSHHandleWMSettingChange;
}
- // See if SDLAudio.dll is present
- SDLAudio_handle = LoadLibrary(TEXT("SDLAudio.dll"));
- if (SDLAudio_handle) {
- IMPORT(SDLAudio_handle, dynamicSDL_AudioQuit, tSDL_AudioQuit, "SDL_AudioQuit")
- IMPORT(SDLAudio_handle, dynamicSDL_Init, tSDL_Init, "SDL_Init")
- IMPORT(SDLAudio_handle, dynamicSDL_PauseAudio, tSDL_PauseAudio, "SDL_PauseAudio")
- IMPORT(SDLAudio_handle, dynamicSDL_OpenAudio, tSDL_OpenAudio, "SDL_OpenAudio")
- }
- else {
- MessageBox(NULL, TEXT("SDLAudio.dll not found - games will play without sound"), TEXT("Missing DLL"), MB_OK);
- dynamicSDL_AudioQuit = defaultSDL_AudioQuit;
- dynamicSDL_Init = defaultSDL_Init;
- dynamicSDL_PauseAudio = defaultSDL_PauseAudio;
- dynamicSDL_OpenAudio = defaultSDL_OpenAudio;
- }
-
// See if GX.dll is present
GAPI_handle = LoadLibrary(TEXT("gx.dll"));
if (GAPI_handle) {
@@ -1354,7 +1338,7 @@
g_scumm->saveState(g_scumm->_saveLoadSlot, g_scumm->_saveLoadCompatible);
dynamicGXCloseInput();
dynamicGXCloseDisplay();
- dynamicSDL_AudioQuit();
+ SDL_AudioQuit();
memset(&se, 0, sizeof(se));
se.cbSize = sizeof(se);
se.hwnd = NULL;
@@ -1469,7 +1453,7 @@
// Mini SDL init
- if (dynamicSDL_Init(SDL_INIT_AUDIO)==-1) {
+ if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_TIMER)==-1) {
exit(1);
}
@@ -1755,10 +1739,10 @@
desired.samples = 128;
desired.callback = own_soundProc;
desired.userdata = param;
- if (dynamicSDL_OpenAudio(&desired, NULL) != 0) {
+ if (SDL_OpenAudio(&desired, NULL) != 0) {
return false;
}
- dynamicSDL_PauseAudio(0);
+ SDL_PauseAudio(0);
return true;
}
More information about the Scummvm-git-logs
mailing list