aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/iphone/osys_iphone.cpp
diff options
context:
space:
mode:
authorOystein Eftevaag2009-02-16 23:21:18 +0000
committerOystein Eftevaag2009-02-16 23:21:18 +0000
commitd61b83814b9295d6fc4192344a96422fed2fe07d (patch)
treeba58dba3d0f8f5c29a94677a3608914cd450eaff /backends/platform/iphone/osys_iphone.cpp
parent6ec40aa9f64101c82daa621610bb9d66a85b4001 (diff)
downloadscummvm-rg350-d61b83814b9295d6fc4192344a96422fed2fe07d.tar.gz
scummvm-rg350-d61b83814b9295d6fc4192344a96422fed2fe07d.tar.bz2
scummvm-rg350-d61b83814b9295d6fc4192344a96422fed2fe07d.zip
Updated the iphone xcode project to include dependency libs, and fixed config/savegame paths
svn-id: r38386
Diffstat (limited to 'backends/platform/iphone/osys_iphone.cpp')
-rw-r--r--backends/platform/iphone/osys_iphone.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/backends/platform/iphone/osys_iphone.cpp b/backends/platform/iphone/osys_iphone.cpp
index 09507a6914..756d42493e 100644
--- a/backends/platform/iphone/osys_iphone.cpp
+++ b/backends/platform/iphone/osys_iphone.cpp
@@ -88,7 +88,12 @@ int OSystem_IPHONE::timerHandler(int t) {
}
void OSystem_IPHONE::initBackend() {
+#ifdef IPHONE_OFFICIAL
+ _savefile = new DefaultSaveFileManager(iPhone_getDocumentsDir());
+#else
_savefile = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH);
+#endif
+
_timer = new DefaultTimerManager();
gettimeofday(&_startTime, NULL);
@@ -1345,12 +1350,26 @@ OSystem *OSystem_IPHONE_create() {
}
Common::SeekableReadStream *OSystem_IPHONE::createConfigReadStream() {
- Common::FSNode file(SCUMMVM_PREFS_PATH);
+#ifdef IPHONE_OFFICIAL
+ char buf[256];
+ strncpy(buf, iPhone_getDocumentsDir(), 256);
+ strncat(buf, "/Preferences", 256 - strlen(buf) );
+ Common::FSNode file(buf);
+#else
+ Common::FSNode file(SCUMMVM_PREFS_PATH);
+#endif
return file.createReadStream();
}
Common::WriteStream *OSystem_IPHONE::createConfigWriteStream() {
- Common::FSNode file(SCUMMVM_PREFS_PATH);
+#ifdef IPHONE_OFFICIAL
+ char buf[256];
+ strncpy(buf, iPhone_getDocumentsDir(), 256);
+ strncat(buf, "/Preferences", 256 - strlen(buf) );
+ Common::FSNode file(buf);
+#else
+ Common::FSNode file(SCUMMVM_PREFS_PATH);
+#endif
return file.createWriteStream();
}