diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-13 21:25:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 21:25:14 +0200 |
commit | 8b0a85ce9841d2051eced9adbb41ff6d360937d2 (patch) | |
tree | 57dd427d68b6134f45a1e84718f652067ce25ba7 | |
parent | bc6ea717718bfbc94065462e9cc3f560442fd0c3 (diff) | |
parent | aa321f0a244fd0a8c072806a12203b8de9b50135 (diff) |
Merge pull request #50433 from naithar/fix/ios-plugin-config
[iOS] Fix plugin configuration loading
-rw-r--r-- | platform/iphone/export/export.cpp | 7 | ||||
-rw-r--r-- | platform/iphone/plugin/godot_plugin_config.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 523dc555f1..f21a14e84b 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -368,6 +368,8 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + found_plugins[i].name), false)); } + Set<String> plist_keys; + for (int i = 0; i < found_plugins.size(); i++) { // Editable plugin plist values PluginConfigIOS plugin = found_plugins[i]; @@ -379,7 +381,10 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) switch (item.type) { case PluginConfigIOS::PlistItemType::STRING_INPUT: { String preset_name = "plugins_plist/" + key; - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, preset_name), item.value)); + if (!plist_keys.has(preset_name)) { + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, preset_name), item.value)); + plist_keys.insert(preset_name); + } } break; default: continue; diff --git a/platform/iphone/plugin/godot_plugin_config.h b/platform/iphone/plugin/godot_plugin_config.h index 06770260aa..f9c5d7e51f 100644 --- a/platform/iphone/plugin/godot_plugin_config.h +++ b/platform/iphone/plugin/godot_plugin_config.h @@ -252,6 +252,8 @@ static inline PluginConfigIOS load_plugin_config(Ref<ConfigFile> config_file, co return plugin_config; } + config_file->clear(); + Error err = config_file->load(path); if (err != OK) { |