From 13b8b957b2396eeb751b4cf145c515cb3c764d42 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Nov 2015 03:27:50 +0100 Subject: [PATCH] (iOS) Use the sandboxed Documents directory --- frontend/drivers/platform_darwin.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/drivers/platform_darwin.m b/frontend/drivers/platform_darwin.m index 055044be87..68f2b9f097 100644 --- a/frontend/drivers/platform_darwin.m +++ b/frontend/drivers/platform_darwin.m @@ -334,7 +334,12 @@ static void frontend_darwin_get_environment_settings(int *argc, char *argv[], CFSearchPathForDirectoriesInDomains(CFDocumentDirectory, CFUserDomainMask, 1, home_dir_buf, sizeof(home_dir_buf)); +#if TARGET_OS_IPHONE + /* Use the sandboxed Documents directory */ + strlcat(home_dir_buf, "/", sizeof(home_dir_buf)); +#else strlcat(home_dir_buf, "/RetroArch", sizeof(home_dir_buf)); +#endif fill_pathname_join(g_defaults.dir.shader, home_dir_buf, "shaders_glsl", sizeof(g_defaults.dir.shader)); fill_pathname_join(g_defaults.dir.core, home_dir_buf, "cores", sizeof(g_defaults.dir.core)); fill_pathname_join(g_defaults.dir.core_info, home_dir_buf, "info", sizeof(g_defaults.dir.core_info));