diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-12-03 17:15:14 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-12-05 01:12:52 +0100 |
commit | dd9503dc1937e1469b2a6f8e145e80acbf2c7cbb (patch) | |
tree | 3d99772bd543ddda07ff17a7ef6247e982488574 /platform/javascript/export | |
parent | 1e7bd3d08be6559ae14b0d25234cfc01298fe450 (diff) |
[HTML5] Make GDNative support feature-based.
This is suboptimal as it requires adding an extra compile flag, but
rewriting how feature tags work is beyond the scope of this work.
Diffstat (limited to 'platform/javascript/export')
-rw-r--r-- | platform/javascript/export/export.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 017ba77231..f77bf6ab97 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -330,6 +330,12 @@ void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportP r_features->push_back("etc2"); } } + ExportMode mode = (ExportMode)(int)p_preset->get("variant/export_type"); + if (mode == EXPORT_MODE_THREADS) { + r_features->push_back("threads"); + } else if (mode == EXPORT_MODE_GDNATIVE) { + r_features->push_back("wasm32"); + } } void EditorExportPlatformJavaScript::get_export_options(List<ExportOption> *r_options) { |