aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index fb6c5f0b47..39d4028e42 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -214,7 +214,7 @@ void registerDefaults() {
// Register default savepath
#ifdef DEFAULT_SAVE_PATH
char savePath[MAXPATHLEN];
-#ifdef UNIX
+#if defined(UNIX) && !defined(IPHONE)
const char *home = getenv("HOME");
if (home && *home && strlen(home) < MAXPATHLEN) {
snprintf(savePath, MAXPATHLEN, "%s/%s", home, DEFAULT_SAVE_PATH);
@@ -224,6 +224,10 @@ void registerDefaults() {
strcpy(savePath, Symbian::GetExecutablePath());
strcat(savePath, DEFAULT_SAVE_PATH);
ConfMan.registerDefault("savepath", savePath);
+#elif defined (IPHONE) // The iphone has / set as home dir when launching from the Springboard.
+ strcpy(savePath, "/var/root/");
+ strcat(savePath, DEFAULT_SAVE_PATH);
+ ConfMan.registerDefault("savepath", savePath);
#endif
#endif // #ifdef DEFAULT_SAVE_PATH
@@ -527,6 +531,11 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar
DO_LONG_OPTION("record-time-file-name")
END_OPTION
+#ifdef IPHONE
+ // This is automatically set when launched from the Springboard.
+ DO_LONG_OPTION_OPT("launchedFromSB", 0)
+ END_OPTION
+#endif
unknownOption:
// If we get till here, the option is unhandled and hence unknown.