From b5ef98637c54a453a6f0ac0ca8c501ceb59924d5 Mon Sep 17 00:00:00 2001 From: Vincent Bénony Date: Thu, 7 Jan 2016 09:51:13 +0100 Subject: IOS: Renames a macro --- audio/softsynth/fluidsynth.cpp | 4 ++-- backends/platform/ios7/iOS7AppDelegate.mm | 2 +- backends/platform/ios7/ios7_osys_main.cpp | 15 +++++++-------- backends/platform/iphone/osys_main.cpp | 6 +++--- devtools/create_project/xcode.cpp | 12 ++++++------ 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp index 4240958616..4dc43499d3 100644 --- a/audio/softsynth/fluidsynth.cpp +++ b/audio/softsynth/fluidsynth.cpp @@ -31,7 +31,7 @@ #include "audio/musicplugin.h" #include "audio/mpu401.h" #include "audio/softsynth/emumidi.h" -#ifdef IPHONE_OFFICIAL_IOS7 +#if defined(IPHONE_IOS7) && defined(IPHONE_SANDBOXED) #include #include #include "backends/platform/ios7/ios7_common.h" @@ -184,7 +184,7 @@ int MidiDriver_FluidSynth::open() { const char *soundfont = ConfMan.get("soundfont").c_str(); -#ifdef IPHONE_OFFICIAL_IOS7 +#if defined(IPHONE_IOS7) && defined(IPHONE_SANDBOXED) // HACK: Due to the sandbox on non-jailbroken iOS devices, we need to deal with the chroot filesystem. // All the path selected by the user are relative to the Document directory. So, we need to adjust // the path to reflect that. diff --git a/backends/platform/ios7/iOS7AppDelegate.mm b/backends/platform/ios7/iOS7AppDelegate.mm index d664f91ccc..e9908ec146 100644 --- a/backends/platform/ios7/iOS7AppDelegate.mm +++ b/backends/platform/ios7/iOS7AppDelegate.mm @@ -32,8 +32,8 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application { CGRect rect = [[UIScreen mainScreen] bounds]; +#ifdef IPHONE_SANDBOXED // Create the directory for savegames -#ifdef IPHONE_OFFICIAL NSFileManager *fm = [NSFileManager defaultManager]; NSString *documentPath = [NSString stringWithUTF8String:iOS7_getDocumentsDir()]; NSString *savePath = [documentPath stringByAppendingPathComponent:@"Savegames"]; diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp index d6b9ce3741..37fa34ce33 100644 --- a/backends/platform/ios7/ios7_osys_main.cpp +++ b/backends/platform/ios7/ios7_osys_main.cpp @@ -88,7 +88,7 @@ OSystem_iOS7::OSystem_iOS7() : _lastErrorMessage(NULL), _mouseCursorPaletteEnabled(false), _gfxTransactionError(kTransactionSuccess) { _queuedInputEvent.type = Common::EVENT_INVALID; _touchpadModeEnabled = !iOS7_isBigDevice(); -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_SANDBOXED _fsFactory = new ChRootFilesystemFactory(iOS7_getDocumentsDir()); #else _fsFactory = new POSIXFilesystemFactory(); @@ -123,7 +123,7 @@ int OSystem_iOS7::timerHandler(int t) { } void OSystem_iOS7::initBackend() { -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_SANDBOXED _savefileManager = new DefaultSaveFileManager("/Savegames"); #else _savefileManager = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH); @@ -282,7 +282,7 @@ OSystem_iOS7 *OSystem_iOS7::sharedInstance() { } Common::String OSystem_iOS7::getDefaultConfigFileName() { -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_SANDBOXED Common::String path = "/Preferences"; return path; #else @@ -299,13 +299,12 @@ void OSystem_iOS7::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) if (CFURLGetFileSystemRepresentation(fileUrl, true, buf, sizeof(buf))) { // Success: Add it to the search path Common::String bundlePath((const char *)buf); -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_SANDBOXED POSIXFilesystemNode *posixNode = new POSIXFilesystemNode(bundlePath); Common::FSNode *node = new Common::FSNode(posixNode); - s.add("__OSX_BUNDLE__", new Common::FSDirectory(*node), priority); + s.add("__IOS_BUNDLE__", new Common::FSDirectory(*node), priority); #else - // OS X - s.add("__OSX_BUNDLE__", new Common::FSDirectory(bundlePath), priority); + s.add("__IOS_BUNDLE__", new Common::FSDirectory(bundlePath), priority); #endif } CFRelease(fileUrl); @@ -351,7 +350,7 @@ void iOS7_main(int argc, char **argv) { //gDebugLevel = 10; } -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_SANDBOXED chdir(iOS7_getDocumentsDir()); #else system("mkdir " SCUMMVM_ROOT_PATH); diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp index 0ce21b44c1..3f5e7692c7 100644 --- a/backends/platform/iphone/osys_main.cpp +++ b/backends/platform/iphone/osys_main.cpp @@ -90,7 +90,7 @@ int OSystem_IPHONE::timerHandler(int t) { } void OSystem_IPHONE::initBackend() { -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_SANDBOXED _savefileManager = new DefaultSaveFileManager(iPhone_getDocumentsDir()); #else _savefileManager = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH); @@ -252,7 +252,7 @@ OSystem *OSystem_IPHONE_create() { } Common::String OSystem_IPHONE::getDefaultConfigFileName() { -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_SANDBOXED Common::String path = iPhone_getDocumentsDir(); path += "/Preferences"; return path; @@ -305,7 +305,7 @@ void iphone_main(int argc, char *argv[]) { //gDebugLevel = 10; } -#ifdef IPHONE_OFFICIAL +#ifdef IPHONE_SANDBOXED chdir(iPhone_getDocumentsDir()); #else system("mkdir " SCUMMVM_ROOT_PATH); diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index d2eec76741..8274875ec5 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -790,8 +790,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) { ValueList scummvm_defines(_defines); REMOVE_DEFINE(scummvm_defines, "MACOSX"); REMOVE_DEFINE(scummvm_defines, "IPHONE"); - REMOVE_DEFINE(scummvm_defines, "IPHONE_OFFICIAL"); - REMOVE_DEFINE(scummvm_defines, "IPHONE_OFFICIAL_IOS7"); + REMOVE_DEFINE(scummvm_defines, "IPHONE_IOS7"); + REMOVE_DEFINE(scummvm_defines, "IPHONE_SANDBOXED"); REMOVE_DEFINE(scummvm_defines, "SDL_BACKEND"); ADD_SETTING_LIST(scummvm_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, kSettingsNoQuote | kSettingsAsList, 5); ADD_SETTING(scummvm_Debug, "GCC_THUMB_SUPPORT", "NO"); @@ -877,8 +877,8 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) { ValueList scummvmIOS_defines; ADD_DEFINE(scummvmIOS_defines, "\"$(inherited)\""); ADD_DEFINE(scummvmIOS_defines, "IPHONE"); - ADD_DEFINE(scummvmIOS_defines, "IPHONE_OFFICIAL"); - ADD_DEFINE(scummvmIOS_defines, "IPHONE_OFFICIAL_IOS7"); + ADD_DEFINE(scummvmIOS_defines, "IPHONE_IOS7"); + ADD_DEFINE(scummvmIOS_defines, "IPHONE_SANDBOXED"); ADD_SETTING_LIST(iPhone_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvmIOS_defines, kSettingsNoQuote | kSettingsAsList, 5); ADD_SETTING(iPhone_Debug, "ASSETCATALOG_COMPILER_APPICON_NAME", "AppIcon"); ADD_SETTING(iPhone_Debug, "ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME", "LaunchImage"); @@ -1033,8 +1033,8 @@ void XcodeProvider::setupDefines(const BuildSetup &setup) { // Add special defines for Mac support REMOVE_DEFINE(_defines, "MACOSX"); REMOVE_DEFINE(_defines, "IPHONE"); - REMOVE_DEFINE(_defines, "IPHONE_OFFICIAL"); - REMOVE_DEFINE(_defines, "IPHONE_OFFICIAL_IOS7"); + REMOVE_DEFINE(_defines, "IPHONE_IOS7"); + REMOVE_DEFINE(_defines, "IPHONE_SANDBOXED"); REMOVE_DEFINE(_defines, "SDL_BACKEND"); ADD_DEFINE(_defines, "CONFIG_H"); ADD_DEFINE(_defines, "UNIX"); -- cgit v1.2.3