aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorLars Persson2006-02-12 00:33:04 +0000
committerLars Persson2006-02-12 00:33:04 +0000
commit0b847325e1b57ad2feec943ae715236cf393d13b (patch)
treefe75e08da4d3967125f8706bbe520d5f66e69e85 /base
parent37f433a7ad516df85cd62e32e1a178635212b047 (diff)
downloadscummvm-rg350-0b847325e1b57ad2feec943ae715236cf393d13b.tar.gz
scummvm-rg350-0b847325e1b57ad2feec943ae715236cf393d13b.tar.bz2
scummvm-rg350-0b847325e1b57ad2feec943ae715236cf393d13b.zip
'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 svn-id: r20586
Diffstat (limited to 'base')
-rw-r--r--base/engine.cpp2
-rw-r--r--base/gameDetector.cpp15
-rw-r--r--base/main.cpp15
3 files changed, 27 insertions, 5 deletions
diff --git a/base/engine.cpp b/base/engine.cpp
index c60611cdda..5da4b9ac43 100644
--- a/base/engine.cpp
+++ b/base/engine.cpp
@@ -193,7 +193,7 @@ void NORETURN CDECL error(const char *s, ...) {
#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)
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index b274a3a9c5..ec33954e8c 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -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 @@ GameDetector::GameDetector() {
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;
diff --git a/base/main.cpp b/base/main.cpp
index 1857467f0d..ec24f0fc68 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -131,6 +131,11 @@ const char *gScummVMFeatures = ""
"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 @@ const char* stackCookie = "$STACK: 655360\0";
#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 @@ extern "C" int main(int argc, char *argv[]) {
// 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);