[Scummvm-cvs-logs] CVS: scummvm/backends/wince findgame.cpp,1.1.1.1,1.2 pocketpc.cpp,1.3,1.4
Max Horn
fingolfin at users.sourceforge.net
Thu Sep 26 05:30:02 CEST 2002
Update of /cvsroot/scummvm/scummvm/backends/wince
In directory usw-pr-cvs1:/tmp/cvs-serv14260/backends/wince
Modified Files:
findgame.cpp pocketpc.cpp
Log Message:
some fixes for the message dialog; added some comments
Index: findgame.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/findgame.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- findgame.cpp 21 Aug 2002 16:07:18 -0000 1.1.1.1
+++ findgame.cpp 26 Sep 2002 12:29:10 -0000 1.2
@@ -31,7 +31,7 @@
#include "scumm.h"
#include "config-file.h"
-extern Config *scummcfg;
+extern Config *g_config;
#define MAX_GAMES 20
@@ -211,14 +211,14 @@
prescanning = FALSE;
- current = scummcfg->get("GamesInstalled", "wince");
+ current = g_config->get("GamesInstalled", "wince");
if (!current)
return FALSE;
index = atoi(current);
installedGamesNumber = index;
- current = scummcfg->get("GamesReferences", "wince");
+ current = g_config->get("GamesReferences", "wince");
if (!current)
return FALSE;
for (i=0; i<index; i++) {
@@ -232,7 +232,7 @@
gamesInstalled[i].reference = j;
}
- current = scummcfg->get("BasePath", "wince");
+ current = g_config->get("BasePath", "wince");
if (!current)
return FALSE;
MultiByteToWideChar(CP_ACP, 0, current, strlen(current) + 1, basePath, sizeof(basePath));
@@ -241,7 +241,7 @@
char keyName[100];
sprintf(keyName, "GamesDirectory%d", i);
- current = scummcfg->get(keyName, "wince");
+ current = g_config->get(keyName, "wince");
if (!current)
return FALSE;
MultiByteToWideChar(CP_ACP, 0, current, strlen(current) + 1, gamesInstalled[i].directory, sizeof(gamesInstalled[i].directory));
@@ -416,7 +416,7 @@
// Save the results in the registry
SetDlgItemText(hwndDlg, IDC_FILEPATH, TEXT("Saving the results"));
- scummcfg->set("GamesInstalled", index, "wince");
+ g_config->set("GamesInstalled", index, "wince");
tempo[0] = '\0';
for (i=0; i<index; i++) {
@@ -425,21 +425,21 @@
strcat(tempo, x);
}
- scummcfg->set("GamesReferences", tempo, "wince");
+ g_config->set("GamesReferences", tempo, "wince");
WideCharToMultiByte(CP_ACP, 0, basePath, wcslen(basePath) + 1, workdir, sizeof(workdir), NULL, NULL);
- scummcfg->set("BasePath", workdir, "wince");
+ g_config->set("BasePath", workdir, "wince");
for (i=0; i<index; i++) {
char keyName[100];
sprintf(keyName, "GamesDirectory%d", i);
WideCharToMultiByte(CP_ACP, 0, gamesInstalled[i].directory, wcslen(gamesInstalled[i].directory) + 1, workdir, sizeof(workdir), NULL, NULL);
- scummcfg->set(keyName, workdir, "wince");
+ g_config->set(keyName, workdir, "wince");
}
- scummcfg->flush();
+ g_config->flush();
SetDlgItemText(hwndDlg, IDC_FILEPATH, TEXT("Scan finished"));
Index: pocketpc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/pocketpc.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pocketpc.cpp 20 Sep 2002 00:12:58 -0000 1.3
+++ pocketpc.cpp 26 Sep 2002 12:29:10 -0000 1.4
@@ -57,7 +57,7 @@
typedef void SoundProc(void *param, byte *buf, int len);
GameDetector detector;
-Config *scummcfg;
+Config *g_config;
tTimeCallback timer_callback;
int timer_interval;
@@ -283,9 +283,9 @@
bool monkey2_keyboard;
void do_quit() {
- scummcfg->set("Sound", sound_activated, "wince");
- scummcfg->set("DisplayMode", GetScreenMode(), "wince");
- scummcfg->flush();
+ g_config->set("Sound", sound_activated, "wince");
+ g_config->set("DisplayMode", GetScreenMode(), "wince");
+ g_config->flush();
GXCloseInput();
GXCloseDisplay();
SDL_AudioQuit();
@@ -402,10 +402,10 @@
hide_toolbar = false;
- scummcfg = new Config("scummvm.ini", "scummvm");
- scummcfg->set_writing(true);
+ g_config = new Config("scummvm.ini", "scummvm");
+ g_config->set_writing(true);
- sound = scummcfg->get("Sound", "wince");
+ sound = g_config->get("Sound", "wince");
if (sound)
sound_activated = (atoi(sound) == 1);
else
@@ -881,9 +881,9 @@
memset(actions_keys, 0, sizeof(actions_keys));
- version = scummcfg->get("KeysVersion", "wince");
+ version = g_config->get("KeysVersion", "wince");
- current = scummcfg->get("ActionKeys", "wince");
+ current = g_config->get("ActionKeys", "wince");
if (current && version) {
for (i=0; i<NUMBER_ACTIONS; i++) {
char x[6];
@@ -905,7 +905,7 @@
actions[3] = ACTION_SKIP;
actions[4] = ACTION_HIDE;
- current = scummcfg->get("ActionTypes", "wince");
+ current = g_config->get("ActionTypes", "wince");
if (current && version) {
for (i=0; i<NUMBER_ACTIONS; i++) {
char x[6];
@@ -920,8 +920,8 @@
setActionTypes(actions);
if (!version) {
- scummcfg->set("KeysVersion", "2", "wince");
- scummcfg->flush();
+ g_config->set("KeysVersion", "2", "wince");
+ g_config->flush();
}
}
@@ -938,7 +938,7 @@
sprintf(x, "%.4x ", work_keys[i]);
strcat(tempo, x);
}
- scummcfg->set("ActionKeys", tempo, "wince");
+ g_config->set("ActionKeys", tempo, "wince");
tempo[0] = '\0';
work = getActionTypes();
for (i=0; i<NUMBER_ACTIONS; i++) {
@@ -946,9 +946,9 @@
sprintf(x, "%.2x ", work[i]);
strcat(tempo, x);
}
- scummcfg->set("ActionTypes", tempo, "wince");
+ g_config->set("ActionTypes", tempo, "wince");
- scummcfg->flush();
+ g_config->flush();
}
/*************** Hardware keys support ***********/
@@ -1001,9 +1001,9 @@
void action_boss() {
SHELLEXECUTEINFO se;
- scummcfg->set("Sound", sound_activated, "wince");
- scummcfg->set("DisplayMode", GetScreenMode(), "wince");
- scummcfg->flush();
+ g_config->set("Sound", sound_activated, "wince");
+ g_config->set("DisplayMode", GetScreenMode(), "wince");
+ g_config->flush();
sound_activated = false;
toolbar_drawn = false;
hide_toolbar = true;
@@ -1159,7 +1159,7 @@
drawWait();
// Set mode, portrait or landscape
- display_mode = scummcfg->get("DisplayMode", "wince");
+ display_mode = g_config->get("DisplayMode", "wince");
if (display_mode)
SetScreenMode(atoi(display_mode));
More information about the Scummvm-git-logs
mailing list