mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-09-20 21:37:26 +02:00
use Documents folder visible from Files app for save data
This commit is contained in:
parent
5cf4303fa2
commit
51d6a1d90f
3 changed files with 23 additions and 1 deletions
|
@ -145,7 +145,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||||
XCODE_ATTRIBUTE_MARKETING_VERSION "2.4"
|
XCODE_ATTRIBUTE_MARKETING_VERSION "2.4"
|
||||||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
|
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
|
||||||
XCODE_ATTRIBUTE_GENERATE_INFOPLIST_FILE YES
|
XCODE_ATTRIBUTE_GENERATE_INFOPLIST_FILE YES
|
||||||
XCODE_ATTRIBUTE_INFOPLIST_FILE ""
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
|
||||||
|
XCODE_ATTRIBUTE_INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace YES
|
||||||
RESOURCE "${DATA_ZIP};AppIcon.xcassets"
|
RESOURCE "${DATA_ZIP};AppIcon.xcassets"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
8
desktop_version/Info.plist
Normal file
8
desktop_version/Info.plist
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>UIFileSharingEnabled</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -1330,6 +1330,19 @@ static int PLATFORM_getOSDirectory(char* output, const size_t output_size)
|
||||||
}
|
}
|
||||||
SDL_snprintf(output, output_size, "%s/", externalStoragePath);
|
SDL_snprintf(output, output_size, "%s/", externalStoragePath);
|
||||||
return 1;
|
return 1;
|
||||||
|
#elif defined(TARGET_OS_IPHONE)
|
||||||
|
// (ab)use SDL APIs to get the path to the Documents folder without needing Objective-C
|
||||||
|
const char* prefsPath = SDL_GetPrefPath("", "");
|
||||||
|
if (prefsPath == NULL)
|
||||||
|
{
|
||||||
|
vlog_error(
|
||||||
|
"Could not get OS directory: %s",
|
||||||
|
SDL_GetError()
|
||||||
|
);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
SDL_snprintf(output, output_size, "%s/../../Documents/", prefsPath);
|
||||||
|
return 1;
|
||||||
#else
|
#else
|
||||||
const char* prefDir = PHYSFS_getPrefDir("distractionware", "VVVVVV");
|
const char* prefDir = PHYSFS_getPrefDir("distractionware", "VVVVVV");
|
||||||
if (prefDir == NULL)
|
if (prefDir == NULL)
|
||||||
|
|
Loading…
Reference in a new issue