aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/wince
diff options
context:
space:
mode:
authorKostas Nakos2008-12-18 08:06:08 +0000
committerKostas Nakos2008-12-18 08:06:08 +0000
commit8a6387ca13330f9cc08946eba282bb4e0cbd45ac (patch)
treec1a72d75d18749819e128e4cee1c17352805e120 /backends/platform/wince
parent50563cbccec30025f8a2552d0ffbf75c50c5415f (diff)
downloadscummvm-rg350-8a6387ca13330f9cc08946eba282bb4e0cbd45ac.tar.gz
scummvm-rg350-8a6387ca13330f9cc08946eba282bb4e0cbd45ac.tar.bz2
scummvm-rg350-8a6387ca13330f9cc08946eba282bb4e0cbd45ac.zip
fix opening of config file + some cleanup
svn-id: r35421
Diffstat (limited to 'backends/platform/wince')
-rw-r--r--backends/platform/wince/wince-sdl.cpp23
-rw-r--r--backends/platform/wince/wince-sdl.h17
2 files changed, 31 insertions, 9 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 3fd66e3dbf..06dbe4f227 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -82,7 +82,7 @@ using namespace CEGUI;
#define NAME_ITEM_OPTIONS "Options"
#define NAME_ITEM_SKIP "Skip"
#define NAME_ITEM_SOUND "Sound"
-#define NAME_ITEM_ORIENTATION "Orientation"
+#define NAME_ITEM_ORIENTATION "Orientation"
#define NAME_ITEM_BINDKEYS "Bindkeys"
// stdin/err redirection
@@ -126,6 +126,7 @@ static const OSystem::GraphicsMode s_supportedGraphicsModesHigh[] = {
{0, 0, 0}
};
+#define DEFAULT_CONFIG_FILE "scummvm.ini"
// ********************************************************************************************
@@ -354,7 +355,7 @@ int dynamic_modules_main(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR szCmdLine, int
argv = (char **) alloca((argc+1)*(sizeof *argv));
ParseCommandLine(cmdline, argv);
- /* fix gdb-emulator combo */
+ // fix gdb-emulator combo
while (argc > 1 && !strstr(argv[0], ".exe")) {
OutputDebugString(TEXT("SDL: gdb argv[0] fixup\n"));
*(argv[1]-1) = ' ';
@@ -454,6 +455,24 @@ bool OSystem_WINCE3::isOzone() {
return _isOzone;
}
+static Common::String getDefaultConfigFileName() {
+ char configFile[MAXPATHLEN];
+ strcpy(configFile, getcwd(NULL, MAX_PATH));
+ strcat(configFile, "\\");
+ strcat(configFile, DEFAULT_CONFIG_FILE);
+ return configFile;
+}
+
+Common::SeekableReadStream *OSystem_WINCE3::openConfigFileForReading() {
+ Common::FSNode file(getDefaultConfigFileName());
+ return file.openForReading();
+}
+
+Common::WriteStream *OSystem_WINCE3::openConfigFileForWriting() {
+ Common::FSNode file(getDefaultConfigFileName());
+ return file.openForWriting();
+}
+
// ********************************************************************************************
diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h
index 47f1bd5b2d..2cca49052b 100644
--- a/backends/platform/wince/wince-sdl.h
+++ b/backends/platform/wince/wince-sdl.h
@@ -69,23 +69,26 @@ public:
void initBackend();
- // Overloaded from SDL_Common (toolbar handling)
+ // Overloaded from SDL backend (toolbar handling)
bool pollEvent(Common::Event &event);
- // Overloaded from SDL_Common (toolbar handling)
+ // Overloaded from SDL backend (toolbar handling)
void drawMouse();
- // Overloaded from SDL_Common (mouse and new scaler handling)
+ // Overloaded from SDL backend (mouse and new scaler handling)
void fillMouseEvent(Common::Event &event, int x, int y);
- // Overloaded from SDL_Common (new scaler handling)
+ // Overloaded from SDL backend (new scaler handling)
void addDirtyRect(int x, int y, int w, int h, bool mouseRect = false);
- // Overloaded from SDL_Common (new scaler handling)
+ // Overloaded from SDL backend (new scaler handling)
void warpMouse(int x, int y);
- // Overloaded from SDL_Commmon
+ // Overloaded from SDL backend
void quit();
- // Overloaded from SDL_Commmon (master volume and sample rate subtleties)
+ // Overloaded from SDL backend (master volume and sample rate subtleties)
void setupMixer();
// Overloaded from OSystem
//void engineInit();
void getTimeAndDate(struct tm &t) const;
+ virtual Common::SeekableReadStream *openConfigFileForReading();
+ virtual Common::WriteStream *openConfigFileForWriting();
+
// Overloaded from SDL_Common (FIXME)
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale); // overloaded by CE backend