From d61b83814b9295d6fc4192344a96422fed2fe07d Mon Sep 17 00:00:00 2001 From: Oystein Eftevaag Date: Mon, 16 Feb 2009 23:21:18 +0000 Subject: Updated the iphone xcode project to include dependency libs, and fixed config/savegame paths svn-id: r38386 --- backends/platform/iphone/osys_iphone.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'backends/platform/iphone/osys_iphone.cpp') 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(); } -- cgit v1.2.3