aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorNicolas Bacca2003-01-20 07:58:41 +0000
committerNicolas Bacca2003-01-20 07:58:41 +0000
commit8f98b316812609594484795c1ccab07f51284264 (patch)
treeab4dfa40ec31eadff17a4eef6e652b3760303769 /backends
parent54a1cf9809fecc5cf58e662a95146e503e13b857 (diff)
downloadscummvm-rg350-8f98b316812609594484795c1ccab07f51284264.tar.gz
scummvm-rg350-8f98b316812609594484795c1ccab07f51284264.tar.bz2
scummvm-rg350-8f98b316812609594484795c1ccab07f51284264.zip
NoGameX file - put in root directory (HPC debug option) and NoMusic configuration option (for really slow devices, can break some games)
svn-id: r6525
Diffstat (limited to 'backends')
-rw-r--r--backends/wince/pocketpc.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/backends/wince/pocketpc.cpp b/backends/wince/pocketpc.cpp
index 4dbf976852..33b3aaeb35 100644
--- a/backends/wince/pocketpc.cpp
+++ b/backends/wince/pocketpc.cpp
@@ -313,7 +313,7 @@ GameX *gameX;
int gameXGXOpenDisplay(HWND hWnd, DWORD dwFlags) {
gameX = new GameX();
- if (!gameX->OpenGraphics()) {
+ if (!gameX || !gameX->OpenGraphics() || !gameX->GetFBAddress()) {
//MessageBox(NULL, TEXT("Couldn't initialize GameX. Reverting to GDI graphics"), TEXT("PocketScumm rendering"), MB_OK);
noGAPI = 1;
}
@@ -791,7 +791,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLin
dynamicGXBeginDraw = defaultGXBeginDraw;
#else
-
dynamicGXOpenInput = gameXGXOpenInput;
dynamicGXGetDefaultKeys = gameXGXGetDefaultKeys;
dynamicGXCloseDisplay = gameXGXCloseDisplay;
@@ -803,6 +802,17 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLin
dynamicGXEndDraw = gameXGXEndDraw;
dynamicGXBeginDraw = gameXGXBeginDraw;
+ FILE *test;
+
+ test = fopen("NoGameX", "r");
+ if (test) {
+ noGAPI = 1;
+ fclose(test);
+ }
+ else
+ if (g_config->getBool("NoGameX", false, "wince"))
+ noGAPI = 1;
+
#endif
gfx_mode_switch = false;
@@ -881,19 +891,23 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLin
}
void runGame(char *game_name) {
- int argc = 3;
- char* argv[3];
+ int argc = 4;
+ char* argv[4];
char argdir[MAX_PATH];
+ char music[100];
+ bool no_music;
select_game = false;
argv[0] = NULL;
sprintf(argdir, "-p%s", _directory);
argv[1] = argdir;
- argv[2] = game_name;
+ no_music = g_config->getBool("NoMusic", false, "wince");
+ sprintf(music, "-e%s", (no_music ? "null" : "adlib"));
+ argv[2] = music;
+ argv[3] = game_name;
- if (!argv[2])
- //return 0;
+ if (!argv[3])
return;
// No default toolbar for zak256