summaryrefslogtreecommitdiff
path: root/platform/iphone
diff options
context:
space:
mode:
Diffstat (limited to 'platform/iphone')
-rw-r--r--platform/iphone/export/export.cpp8
-rw-r--r--platform/iphone/os_iphone.cpp26
-rw-r--r--platform/iphone/os_iphone.h2
3 files changed, 27 insertions, 9 deletions
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index b606d570c2..104f9e751e 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -1030,7 +1030,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
print_line("Creating " + dir_name);
Error dir_err = tmp_app_path->make_dir_recursive(dir_name);
if (dir_err) {
- ERR_PRINTS("Can't create '" + dir_name + "'.");
+ ERR_PRINT("Can't create '" + dir_name + "'.");
unzClose(src_pkg_zip);
memdelete(tmp_app_path);
return ERR_CANT_CREATE;
@@ -1040,7 +1040,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
/* write the file */
FileAccess *f = FileAccess::open(file, FileAccess::WRITE);
if (!f) {
- ERR_PRINTS("Can't write '" + file + "'.");
+ ERR_PRINT("Can't write '" + file + "'.");
unzClose(src_pkg_zip);
memdelete(tmp_app_path);
return ERR_CANT_CREATE;
@@ -1064,7 +1064,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
unzClose(src_pkg_zip);
if (!found_library) {
- ERR_PRINTS("Requested template library '" + library_to_use + "' not found. It might be missing from your template archive.");
+ ERR_PRINT("Requested template library '" + library_to_use + "' not found. It might be missing from your template archive.");
memdelete(tmp_app_path);
return ERR_FILE_NOT_FOUND;
}
@@ -1093,7 +1093,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
String project_file_name = dest_dir + binary_name + ".xcodeproj/project.pbxproj";
FileAccess *f = FileAccess::open(project_file_name, FileAccess::WRITE);
if (!f) {
- ERR_PRINTS("Can't write '" + project_file_name + "'.");
+ ERR_PRINT("Can't write '" + project_file_name + "'.");
return ERR_CANT_CREATE;
};
f->store_buffer(project_file_data.ptr(), project_file_data.size());
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 7b1d0e6db1..7a699f9b50 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -356,14 +356,32 @@ void OSIPhone::delete_main_loop() {
void OSIPhone::finalize() {
- if (main_loop) // should not happen?
- memdelete(main_loop);
+ delete_main_loop();
+
+ memdelete(input);
+ memdelete(ios);
+
+#ifdef GAME_CENTER_ENABLED
+ memdelete(game_center);
+#endif
+
+#ifdef STOREKIT_ENABLED
+ memdelete(store_kit);
+#endif
+
+#ifdef ICLOUD_ENABLED
+ memdelete(icloud);
+#endif
visual_server->finish();
memdelete(visual_server);
// memdelete(rasterizer);
- memdelete(input);
+ // Free unhandled events before close
+ for (int i = 0; i < MAX_EVENTS; i++) {
+ event_queue[i].unref();
+ };
+ event_count = 0;
};
void OSIPhone::set_mouse_show(bool p_show){};
@@ -464,7 +482,7 @@ extern Error _shell_open(String p_uri);
extern void _set_keep_screen_on(bool p_enabled);
extern void _vibrate();
-void OSIPhone::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) {
+void OSIPhone::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect, int p_max_input_length) {
_show_keyboard(p_existing_text);
};
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h
index 4668471aa9..d2d96181f5 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/iphone/os_iphone.h
@@ -165,7 +165,7 @@ public:
virtual bool can_draw() const;
virtual bool has_virtual_keyboard() const;
- virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2());
+ virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2(), int p_max_input_length = -1);
virtual void hide_virtual_keyboard();
virtual int get_virtual_keyboard_height() const;