aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorOystein Eftevaag2007-11-13 08:06:15 +0000
committerOystein Eftevaag2007-11-13 08:06:15 +0000
commit05b5a493f85350ec5df86dc95045fee6e193ed27 (patch)
tree84ad89c3bcc76e82b4e80281850411b0507f4351 /base
parentc908a8a73fe5d908c23208fc259d16b647c09d56 (diff)
downloadscummvm-rg350-05b5a493f85350ec5df86dc95045fee6e193ed27.tar.gz
scummvm-rg350-05b5a493f85350ec5df86dc95045fee6e193ed27.tar.bz2
scummvm-rg350-05b5a493f85350ec5df86dc95045fee6e193ed27.zip
Initial commit of the iPhone/iPod Touch backend
svn-id: r29488
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.