summaryrefslogtreecommitdiff
path: root/platform/iphone/os_iphone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/iphone/os_iphone.cpp')
-rw-r--r--platform/iphone/os_iphone.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 219e93facf..08792b8631 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -97,6 +97,8 @@ void OSIPhone::initialize_core() {
OS_Unix::initialize_core();
SemaphoreIphone::make_default();
+
+ set_data_dir(data_dir);
};
void OSIPhone::initialize_logger() {
@@ -572,7 +574,7 @@ bool OSIPhone::_check_internal_feature_support(const String &p_feature) {
return p_feature == "mobile" || p_feature == "etc" || p_feature == "pvrtc" || p_feature == "etc2";
}
-OSIPhone::OSIPhone(int width, int height) {
+OSIPhone::OSIPhone(int width, int height, String p_data_dir) {
main_loop = NULL;
visual_server = NULL;
@@ -586,6 +588,10 @@ OSIPhone::OSIPhone(int width, int height) {
event_count = 0;
virtual_keyboard_height = 0;
+ // can't call set_data_dir from here, since it requires DirAccess
+ // which is initialized in initialize_core
+ data_dir = p_data_dir;
+
_set_logger(memnew(SyslogLogger));
};