[Scummvm-cvs-logs] SF.net SVN: scummvm: [20586] scummvm/trunk/base
anotherguest at users.sourceforge.net
anotherguest at users.sourceforge.net
Sat Feb 11 16:34:03 CET 2006
Revision: 20586
Author: anotherguest
Date: 2006-02-11 16:33:04 -0800 (Sat, 11 Feb 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=20586&view=rev
Log Message:
-----------
'Changed Symbian configuration handling so it is using the basepath of the application installation as a path for Savegames, ini files etc
*Updated list.h so it also compiles for Symbian codewarrior and gcce compilers
Modified Paths:
--------------
scummvm/trunk/base/engine.cpp
scummvm/trunk/base/gameDetector.cpp
scummvm/trunk/base/main.cpp
scummvm/trunk/common/config-manager.cpp
scummvm/trunk/common/list.h
Modified: scummvm/trunk/base/engine.cpp
===================================================================
--- scummvm/trunk/base/engine.cpp 2006-02-12 00:27:19 UTC (rev 20585)
+++ scummvm/trunk/base/engine.cpp 2006-02-12 00:33:04 UTC (rev 20586)
@@ -193,7 +193,7 @@
#endif
#ifdef __SYMBIAN32__
- SymbianFatalError(buf_output);
+ Symbian::FatalError(buf_output);
#endif
// Finally exit. quit() will terminate the program if g_system iss present
if (g_system)
Modified: scummvm/trunk/base/gameDetector.cpp
===================================================================
--- scummvm/trunk/base/gameDetector.cpp 2006-02-12 00:27:19 UTC (rev 20585)
+++ scummvm/trunk/base/gameDetector.cpp 2006-02-12 00:33:04 UTC (rev 20586)
@@ -46,6 +46,10 @@
#else
#define DEFAULT_SAVE_PATH ".scummvm"
#endif
+#else if defined(__SYMBIAN32__)
+#include <errno.h>
+#include <sys/stat.h>
+#define DEFAULT_SAVE_PATH "Savegames"
#endif
// DONT FIXME: DO NOT ORDER ALPHABETICALLY, THIS IS ORDERED BY IMPORTANCE/CATEGORY! :)
@@ -199,8 +203,17 @@
ConfMan.registerDefault("savepath", savePath);
}
}
+#else if defined(__SYMBIAN32__)
+ strcpy(savePath, Symbian::GetExecutablePath());
+ strcat(savePath, DEFAULT_SAVE_PATH);
+ struct stat sb;
+ if (stat(savePath, &sb) == -1)
+ if (errno == ENOENT)// create the dir if it does not exist
+ if (mkdir(savePath, 0755) != 0)
+ error("mkdir for '%s' failed!", savePath);
+ ConfMan.registerDefault("savepath", savePath); // this should be enough...
#endif
-#endif
+#endif // #ifdef DEFAULT_SAVE_PATH
_dumpScripts = false;
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp 2006-02-12 00:27:19 UTC (rev 20585)
+++ scummvm/trunk/base/main.cpp 2006-02-12 00:33:04 UTC (rev 20586)
@@ -131,6 +131,11 @@
"FluidSynth "
#endif
+#ifdef __SYMBIAN32__
+// we want a list of compiled in engines visible in the program,
+// because we also release special builds with only one engine
+#include "backends/epoc/src/main_features.inl"
+#endif
;
#if defined(__amigaos4__)
@@ -142,9 +147,6 @@
#include <cstdio>
#define STDOUT_FILE TEXT("stdout.txt")
#define STDERR_FILE TEXT("stderr.txt")
-#elif defined(__SYMBIAN32__) // Symbian does not like any output to the console through any *print* function
-#define STDOUT_FILE SYMBIAN32_DOC_DIR "scummvm.stdout.txt"
-#define STDERR_FILE SYMBIAN32_DOC_DIR "scummvm.stderr.txt"
#endif
#if defined(QTOPIA)
@@ -340,6 +342,13 @@
// Code copied from SDL_main
#if (defined(WIN32) && defined(NO_CONSOLE)) || defined(__SYMBIAN32__)
// Symbian does not like any output to the console through any *print* function
+#if defined(__SYMBIAN32__)
+ char STDOUT_FILE[255], STDERR_FILE[255]; // shhh, don't tell anybody :)
+ strcpy(STDOUT_FILE, Symbian::GetExecutablePath());
+ strcpy(STDERR_FILE, Symbian::GetExecutablePath());
+ strcat(STDOUT_FILE, "scummvm.stdout.txt");
+ strcat(STDERR_FILE, "scummvm.stderr.txt");
+#endif
/* Flush the output in case anything is queued */
fclose(stdout);
Modified: scummvm/trunk/common/config-manager.cpp
===================================================================
--- scummvm/trunk/common/config-manager.cpp 2006-02-12 00:27:19 UTC (rev 20585)
+++ scummvm/trunk/common/config-manager.cpp 2006-02-12 00:33:04 UTC (rev 20586)
@@ -109,7 +109,8 @@
#elif defined(__PSP__)
strcpy(configFile, "ms0:/" DEFAULT_CONFIG_FILE);
#elif defined (__SYMBIAN32__)
- strcpy(configFile, SYMBIAN32_DOC_DIR DEFAULT_CONFIG_FILE);
+ strcpy(configFile, Symbian::GetExecutablePath());
+ strcat(configFile, DEFAULT_CONFIG_FILE);
#else
strcpy(configFile, DEFAULT_CONFIG_FILE);
#endif
Modified: scummvm/trunk/common/list.h
===================================================================
--- scummvm/trunk/common/list.h 2006-02-12 00:27:19 UTC (rev 20585)
+++ scummvm/trunk/common/list.h 2006-02-12 00:33:04 UTC (rev 20586)
@@ -55,7 +55,7 @@
friend class List<T>;
NodeBase *_node;
-#ifndef PALMOS_MODE
+#if !defined (PALMOS_MODE) && !defined (__WINSCW__)
explicit Iterator<T2>(NodeBase *node) : _node(node) {}
#else
Iterator<T2>(NodeBase *node) : _node(node) {}
@@ -72,7 +72,7 @@
}
// Postfix inc
Iterator<T2> operator++(int) {
-#ifndef PALMOS_MODE
+#if !defined (PALMOS_MODE) && !defined (__SYMBIAN32__)
Iterator<T2> tmp(_node);
#else
Iterator tmp(_node);
More information about the Scummvm-git-logs
mailing list