diff options
| author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2020-03-18 17:40:04 +0100 |
|---|---|---|
| committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2020-03-31 09:37:16 +0200 |
| commit | 77dd06134504ce68cc79b879c4a28d76a2c975f8 (patch) | |
| tree | a4551344d3914ce93cfc25590f3c7261a27d4ab5 /modules/mono/mono_gd/gd_mono_utils.cpp | |
| parent | fa08437694d09f0d5ee594cb4fbe1ff72b074742 (diff) | |
| download | redot-engine-77dd06134504ce68cc79b879c4a28d76a2c975f8.tar.gz | |
Mono/C#: Add iOS support
Right now, games only work on devices when exported with FullAOT+Interpreter.
There are some issues left that need to addressed for FullAOT alone. Right now,
it's giving issues with the Godot.NativeCalls static constructor.
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_utils.cpp')
| -rw-r--r-- | modules/mono/mono_gd/gd_mono_utils.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp index cdb26ae61b..5a2bdffe54 100644 --- a/modules/mono/mono_gd/gd_mono_utils.cpp +++ b/modules/mono/mono_gd/gd_mono_utils.cpp @@ -129,7 +129,12 @@ void set_main_thread(MonoThread *p_thread) { MonoThread *attach_current_thread() { ERR_FAIL_COND_V(!GDMono::get_singleton()->is_runtime_initialized(), NULL); MonoDomain *scripts_domain = GDMono::get_singleton()->get_scripts_domain(); +#ifndef GD_MONO_SINGLE_APPDOMAIN MonoThread *mono_thread = mono_thread_attach(scripts_domain ? scripts_domain : mono_get_root_domain()); +#else + // The scripts domain is the root domain + MonoThread *mono_thread = mono_thread_attach(scripts_domain); +#endif ERR_FAIL_NULL_V(mono_thread, NULL); return mono_thread; } |
