diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/arkit/arkit_interface.mm | 19 | ||||
-rw-r--r-- | modules/assimp/import_utils.h | 2 | ||||
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 3 | ||||
-rw-r--r-- | modules/mono/build_scripts/mono_configure.py | 5 | ||||
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs | 4 | ||||
-rw-r--r-- | modules/mono/glue/Managed/Files/NodePath.cs | 2 | ||||
-rw-r--r-- | modules/mono/glue/Managed/Files/RID.cs | 2 | ||||
-rw-r--r-- | modules/opus/SCsub | 14 | ||||
-rw-r--r-- | modules/regex/SCsub | 4 |
9 files changed, 39 insertions, 16 deletions
diff --git a/modules/arkit/arkit_interface.mm b/modules/arkit/arkit_interface.mm index 9614f775a5..71642cfc30 100644 --- a/modules/arkit/arkit_interface.mm +++ b/modules/arkit/arkit_interface.mm @@ -37,6 +37,8 @@ #import <ARKit/ARKit.h> #import <UIKit/UIKit.h> +#include <dlfcn.h> + #include "arkit_interface.h" #include "arkit_session_delegate.h" @@ -53,7 +55,10 @@ void ARKitInterface::start_session() { // Ignore this if we're not initialized... if (initialized) { print_line("Starting ARKit session"); - ARWorldTrackingConfiguration *configuration = [ARWorldTrackingConfiguration new]; + + Class ARWorldTrackingConfigurationClass = NSClassFromString(@"ARWorldTrackingConfiguration"); + ARWorldTrackingConfiguration *configuration = [ARWorldTrackingConfigurationClass new]; + configuration.lightEstimationEnabled = light_estimation_is_enabled; if (plane_detection_is_enabled) { configuration.planeDetection = ARPlaneDetectionVertical | ARPlaneDetectionHorizontal; @@ -221,7 +226,17 @@ bool ARKitInterface::initialize() { print_line("initializing ARKit"); // create our ar session and delegate - ar_session = [ARSession new]; + Class ARSessionClass = NSClassFromString(@"ARSession"); + if (ARSessionClass == Nil) { + void *arkit_handle = dlopen("/System/Library/Frameworks/ARKit.framework/ARKit", RTLD_NOW); + if (arkit_handle) { + ARSessionClass = NSClassFromString(@"ARSession"); + } else { + print_line("ARKit init failed"); + return false; + } + } + ar_session = [ARSessionClass new]; ar_delegate = [ARKitSessionDelegate new]; ar_delegate.arkit_interface = this; ar_session.delegate = ar_delegate; diff --git a/modules/assimp/import_utils.h b/modules/assimp/import_utils.h index 7b14804ddc..8135b352c6 100644 --- a/modules/assimp/import_utils.h +++ b/modules/assimp/import_utils.h @@ -394,7 +394,9 @@ public: return Ref<Image>(); } else { Ref<Texture> texture = ResourceLoader::load(p_path); + ERR_FAIL_COND_V(texture.is_null(), Ref<Image>()); Ref<Image> image = texture->get_data(); + ERR_FAIL_COND_V(image.is_null(), Ref<Image>()); state.path_to_image_cache.insert(p_path, image); return image; } diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 1d82735328..280bc37dc0 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -84,14 +84,17 @@ String GDScriptLanguage::_get_processed_template(const String &p_template, const Ref<Script> GDScriptLanguage::get_template(const String &p_class_name, const String &p_base_class_name) const { String _template = "extends %BASE%\n" "\n" + "\n" "# Declare member variables here. Examples:\n" "# var a%INT_TYPE% = 2\n" "# var b%STRING_TYPE% = \"text\"\n" "\n" + "\n" "# Called when the node enters the scene tree for the first time.\n" "func _ready()%VOID_RETURN%:\n" "%TS%pass # Replace with function body.\n" "\n" + "\n" "# Called every frame. 'delta' is the elapsed time since the previous frame.\n" "#func _process(delta%FLOAT_TYPE%)%VOID_RETURN%:\n" "#%TS%pass\n"; diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py index e83c3f19a6..5388061f84 100644 --- a/modules/mono/build_scripts/mono_configure.py +++ b/modules/mono/build_scripts/mono_configure.py @@ -432,6 +432,11 @@ def copy_mono_shared_libs(env, mono_root, target_mono_root_dir): os.makedirs(target_mono_bin_dir) copy(os.path.join(mono_root, 'bin', 'MonoPosixHelper.dll'), target_mono_bin_dir) + + # For newer versions + btls_dll_path = os.path.join(mono_root, 'bin', 'libmono-btls-shared.dll') + if os.path.isfile(btls_dll_path): + copy(btls_dll_path, target_mono_bin_dir) else: target_mono_lib_dir = get_android_out_dir(env) if platform == 'android' else os.path.join(target_mono_root_dir, 'lib') diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs index f65d2a39f4..cf3823fd16 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs @@ -164,12 +164,12 @@ namespace GodotTools.Export Directory.Delete(aotTempDir, recursive: true); // TODO: Just a workaround until the export plugins can be made to abort with errors - if (string.IsNullOrEmpty(maybeLastExportError)) // Check empty as well, because it's set to empty after hot-reloading + if (!string.IsNullOrEmpty(maybeLastExportError)) // Check empty as well, because it's set to empty after hot-reloading { string lastExportError = maybeLastExportError; maybeLastExportError = null; - GodotSharpEditor.Instance.ShowErrorDialog(lastExportError, "C# export failed"); + GodotSharpEditor.Instance.ShowErrorDialog(lastExportError, "Failed to export C# project"); } } diff --git a/modules/mono/glue/Managed/Files/NodePath.cs b/modules/mono/glue/Managed/Files/NodePath.cs index 4de4e1e6a9..8c5872ba5a 100644 --- a/modules/mono/glue/Managed/Files/NodePath.cs +++ b/modules/mono/glue/Managed/Files/NodePath.cs @@ -12,7 +12,7 @@ namespace Godot internal static IntPtr GetPtr(NodePath instance) { if (instance == null) - return IntPtr.Zero; + throw new NullReferenceException($"The instance of type {nameof(NodePath)} is null."); if (instance.disposed) throw new ObjectDisposedException(instance.GetType().FullName); diff --git a/modules/mono/glue/Managed/Files/RID.cs b/modules/mono/glue/Managed/Files/RID.cs index 12064beca2..94761531b1 100644 --- a/modules/mono/glue/Managed/Files/RID.cs +++ b/modules/mono/glue/Managed/Files/RID.cs @@ -12,7 +12,7 @@ namespace Godot internal static IntPtr GetPtr(RID instance) { if (instance == null) - return IntPtr.Zero; + throw new NullReferenceException($"The instance of type {nameof(RID)} is null."); if (instance.disposed) throw new ObjectDisposedException(instance.GetType().FullName); diff --git a/modules/opus/SCsub b/modules/opus/SCsub index 8af4f16a26..1db5b0987e 100644 --- a/modules/opus/SCsub +++ b/modules/opus/SCsub @@ -20,9 +20,6 @@ if env['builtin_opus']: "opus_multistream.c", "opus_multistream_encoder.c", "opus_multistream_decoder.c", - "opus_projection_encoder.c", - "opus_projection_decoder.c", - "mapping_matrix.c", "repacketizer.c", "analysis.c", @@ -56,10 +53,9 @@ if env['builtin_opus']: "celt/vq.c", #"celt/arm/arm_celt_map.c", #"celt/arm/armcpu.c", - #"celt/arm/celt_fft_ne10.c", - #"celt/arm/celt_mdct_ne10.c", + #"celt/arm/celt_ne10_fft.c", + #"celt/arm/celt_ne10_mdct.c", #"celt/arm/celt_neon_intr.c", - #"celt/arm/pitch_neon_intr.c", # Sync with silk_sources.mk "silk/CNG.c", @@ -117,7 +113,6 @@ if env['builtin_opus']: "silk/lin2log.c", "silk/log2lin.c", "silk/LPC_analysis_filter.c", - "silk/LPC_fit.c", "silk/LPC_inv_pred_gain.c", "silk/table_LSF_cos.c", "silk/NLSF2A.c", @@ -155,10 +150,12 @@ if env['builtin_opus']: "silk/fixed/find_pitch_lags_FIX.c", "silk/fixed/find_pred_coefs_FIX.c", "silk/fixed/noise_shape_analysis_FIX.c", + "silk/fixed/prefilter_FIX.c", "silk/fixed/process_gains_FIX.c", "silk/fixed/regularize_correlations_FIX.c", "silk/fixed/residual_energy16_FIX.c", "silk/fixed/residual_energy_FIX.c", + "silk/fixed/solve_LS_FIX.c", "silk/fixed/warped_autocorrelation_FIX.c", "silk/fixed/apply_sine_window_FIX.c", "silk/fixed/autocorr_FIX.c", @@ -183,9 +180,11 @@ if env['builtin_opus']: "silk/float/LTP_analysis_filter_FLP.c", "silk/float/LTP_scale_ctrl_FLP.c", "silk/float/noise_shape_analysis_FLP.c", + "silk/float/prefilter_FLP.c", "silk/float/process_gains_FLP.c", "silk/float/regularize_correlations_FLP.c", "silk/float/residual_energy_FLP.c", + "silk/float/solve_LS_FLP.c", "silk/float/warped_autocorrelation_FLP.c", "silk/float/wrappers_FLP.c", "silk/float/autocorrelation_FLP.c", @@ -194,6 +193,7 @@ if env['builtin_opus']: "silk/float/energy_FLP.c", "silk/float/inner_product_FLP.c", "silk/float/k2a_FLP.c", + "silk/float/levinsondurbin_FLP.c", "silk/float/LPC_inv_pred_gain_FLP.c", "silk/float/pitch_analysis_core_FLP.c", "silk/float/scale_copy_vector_FLP.c", diff --git a/modules/regex/SCsub b/modules/regex/SCsub index 1be5af02a5..6238cd3d9f 100644 --- a/modules/regex/SCsub +++ b/modules/regex/SCsub @@ -6,12 +6,10 @@ Import('env_modules') env_regex = env_modules.Clone() if env['builtin_pcre2']: - jit_blacklist = ['javascript', 'uwp'] - thirdparty_dir = '#thirdparty/pcre2/src/' thirdparty_flags = ['PCRE2_STATIC', 'HAVE_CONFIG_H'] - if 'platform' in env and env['platform'] not in jit_blacklist: + if env['builtin_pcre2_with_jit']: thirdparty_flags.append('SUPPORT_JIT') thirdparty_sources = [ |