diff --git a/CMakeLists.txt b/CMakeLists.txt index 5da94fb773..f55edd8a16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -969,9 +969,8 @@ if (IOS) set(RSRC_XIB_FILES assets/Icon@2x.png) SET_SOURCE_FILES_PROPERTIES(${RSRC_XIB_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set(APP_DIR_NAME \${TARGET_BUILD_DIR}/\${FULL_PRODUCT_NAME}) - set(RES_DIR assets) add_custom_command(TARGET PPSSPP POST_BUILD - COMMAND tar -c -C . --exclude .DS_Store --exclude .git -H `find ${RES_DIR}` | tar -x -C ${APP_DIR_NAME} + COMMAND tar -c -C . --exclude .DS_Store --exclude .git -H `find assets` | tar -x -C ${APP_DIR_NAME} ) set_target_properties(${TargetBin} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "../ios/PPSSPP-Info.plist" XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer: My Name") endif() diff --git a/android/jni/NativeApp.cpp b/android/jni/NativeApp.cpp index 2962fc4c6d..5a8fabb9c9 100644 --- a/android/jni/NativeApp.cpp +++ b/android/jni/NativeApp.cpp @@ -166,6 +166,8 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co #ifdef BLACKBERRY // Packed assets are included in app/native/ dir VFSRegister("", new DirectoryAssetReader("app/native/assets/")); +#elif defined(IOS) + VFSRegister("", new DirectoryAssetReader(external_directory); #else VFSRegister("", new DirectoryAssetReader("assets/")); #endif @@ -179,7 +181,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co LogManager *logman = LogManager::GetInstance(); ILOG("Logman: %p", logman); - config_filename = user_data_path + "ppsspp.ini"; + config_filename = user_data_path + "/ppsspp.ini"; g_Config.Load(config_filename.c_str()); @@ -233,7 +235,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co if (g_Config.currentDirectory == "") { #if defined(ANDROID) g_Config.currentDirectory = external_directory; -#elif defined(BLACKBERRY) || defined(__SYMBIAN32__) +#elif defined(BLACKBERRY) || defined(__SYMBIAN32__) || defined(IOS) g_Config.currentDirectory = savegame_directory; #else g_Config.currentDirectory = getenv("HOME"); @@ -246,7 +248,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co // most sense. g_Config.memCardDirectory = std::string(external_directory) + "/"; g_Config.flashDirectory = std::string(external_directory)+"/flash/"; -#elif defined(BLACKBERRY) || defined(__SYMBIAN32__) +#elif defined(BLACKBERRY) || defined(__SYMBIAN32__) || defined(IOS) g_Config.memCardDirectory = user_data_path; g_Config.flashDirectory = user_data_path+"/flash/"; #else diff --git a/ios/ViewController.mm b/ios/ViewController.mm index e979295676..da3699e194 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -62,7 +62,7 @@ ViewController* sharedViewController; net::Init(); ram_temp_file = [[NSTemporaryDirectory() stringByAppendingPathComponent:@"ram_tmp.file"] fileSystemRepresentation]; - NativeInit(0, NULL, [self.bundlePath UTF8String], [self.documentsPath UTF8String], NULL); + NativeInit(0, NULL, [self.documentsPath UTF8String], [self.bundlePath UTF8String], NULL); } return self;