summaryrefslogtreecommitdiffstats
path: root/platform/ios
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/detect.py10
-rw-r--r--platform/ios/display_server_ios.mm8
-rw-r--r--platform/ios/export/export_plugin.cpp2
-rw-r--r--platform/ios/ios.mm2
4 files changed, 12 insertions, 10 deletions
diff --git a/platform/ios/detect.py b/platform/ios/detect.py
index 20a3a996bc..0f7f938852 100644
--- a/platform/ios/detect.py
+++ b/platform/ios/detect.py
@@ -3,6 +3,7 @@ import sys
from typing import TYPE_CHECKING
from methods import detect_darwin_sdk_path, print_error, print_warning
+from platform_methods import validate_arch
if TYPE_CHECKING:
from SCons.Script.SConscript import SConsEnvironment
@@ -60,12 +61,7 @@ def get_flags():
def configure(env: "SConsEnvironment"):
# Validate arch.
supported_arches = ["x86_64", "arm64"]
- if env["arch"] not in supported_arches:
- print_error(
- 'Unsupported CPU architecture "%s" for iOS. Supported architectures are: %s.'
- % (env["arch"], ", ".join(supported_arches))
- )
- sys.exit(255)
+ validate_arch(env["arch"], get_name(), supported_arches)
## LTO
@@ -134,7 +130,7 @@ def configure(env: "SConsEnvironment"):
elif env["arch"] == "arm64":
env.Append(
CCFLAGS=(
- "-fobjc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing"
+ "-fobjc-arc -arch arm64 -fmessage-length=0"
" -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits"
" -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies"
" -isysroot $IOS_SDK_PATH".split()
diff --git a/platform/ios/display_server_ios.mm b/platform/ios/display_server_ios.mm
index dcc6ce9218..5d9179bd9a 100644
--- a/platform/ios/display_server_ios.mm
+++ b/platform/ios/display_server_ios.mm
@@ -111,19 +111,24 @@ DisplayServerIOS::DisplayServerIOS(const String &p_rendering_driver, WindowMode
if (rendering_context->initialize() != OK) {
memdelete(rendering_context);
rendering_context = nullptr;
+#if defined(GLES3_ENABLED)
bool fallback_to_opengl3 = GLOBAL_GET("rendering/rendering_device/fallback_to_opengl3");
if (fallback_to_opengl3 && rendering_driver != "opengl3") {
WARN_PRINT("Your device seem not to support MoltenVK or Metal, switching to OpenGL 3.");
rendering_driver = "opengl3";
OS::get_singleton()->set_current_rendering_method("gl_compatibility");
OS::get_singleton()->set_current_rendering_driver_name(rendering_driver);
- } else {
+ } else
+#endif
+ {
ERR_PRINT(vformat("Failed to initialize %s context", rendering_driver));
r_error = ERR_UNAVAILABLE;
return;
}
}
+ }
+ if (rendering_context) {
if (rendering_context->window_create(MAIN_WINDOW_ID, &wpd) != OK) {
ERR_PRINT(vformat("Failed to create %s window.", rendering_driver));
memdelete(rendering_context);
@@ -365,6 +370,7 @@ bool DisplayServerIOS::has_feature(Feature p_feature) const {
// case FEATURE_NATIVE_DIALOG:
// case FEATURE_NATIVE_DIALOG_INPUT:
// case FEATURE_NATIVE_DIALOG_FILE:
+ // case FEATURE_NATIVE_DIALOG_FILE_EXTRA:
// case FEATURE_NATIVE_ICON:
// case FEATURE_WINDOW_TRANSPARENCY:
case FEATURE_CLIPBOARD:
diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp
index d6cd2e0f3c..3c5a930bab 100644
--- a/platform/ios/export/export_plugin.cpp
+++ b/platform/ios/export/export_plugin.cpp
@@ -1082,7 +1082,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_file(const Ref<EditorExpor
}
if (splash.is_null()) {
- splash = Ref<Image>(memnew(Image(boot_splash_png)));
+ splash.instantiate(boot_splash_png);
}
// Using same image for both @2x and @3x
diff --git a/platform/ios/ios.mm b/platform/ios/ios.mm
index 6943de5ac8..26067b94bb 100644
--- a/platform/ios/ios.mm
+++ b/platform/ios/ios.mm
@@ -42,7 +42,7 @@ void iOS::_bind_methods() {
ClassDB::bind_method(D_METHOD("supports_haptic_engine"), &iOS::supports_haptic_engine);
ClassDB::bind_method(D_METHOD("start_haptic_engine"), &iOS::start_haptic_engine);
ClassDB::bind_method(D_METHOD("stop_haptic_engine"), &iOS::stop_haptic_engine);
-};
+}
bool iOS::supports_haptic_engine() {
if (@available(iOS 13, *)) {