[Scummvm-cvs-logs] SF.net SVN: scummvm:[35421] scummvm/trunk/backends/platform/wince
knakos at users.sourceforge.net
knakos at users.sourceforge.net
Thu Dec 18 09:06:09 CET 2008
Revision: 35421
http://scummvm.svn.sourceforge.net/scummvm/?rev=35421&view=rev
Author: knakos
Date: 2008-12-18 08:06:08 +0000 (Thu, 18 Dec 2008)
Log Message:
-----------
fix opening of config file + some cleanup
Modified Paths:
--------------
scummvm/trunk/backends/platform/wince/wince-sdl.cpp
scummvm/trunk/backends/platform/wince/wince-sdl.h
Modified: scummvm/trunk/backends/platform/wince/wince-sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.cpp 2008-12-18 05:04:55 UTC (rev 35420)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.cpp 2008-12-18 08:06:08 UTC (rev 35421)
@@ -82,7 +82,7 @@
#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 @@
{0, 0, 0}
};
+#define DEFAULT_CONFIG_FILE "scummvm.ini"
// ********************************************************************************************
@@ -354,7 +355,7 @@
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 @@
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();
+}
+
// ********************************************************************************************
Modified: scummvm/trunk/backends/platform/wince/wince-sdl.h
===================================================================
--- scummvm/trunk/backends/platform/wince/wince-sdl.h 2008-12-18 05:04:55 UTC (rev 35420)
+++ scummvm/trunk/backends/platform/wince/wince-sdl.h 2008-12-18 08:06:08 UTC (rev 35421)
@@ -69,24 +69,27 @@
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
void undrawMouse();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list