summaryrefslogtreecommitdiffstats
path: root/platform/javascript/export/export_plugin.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-05-24 18:12:26 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-06-14 14:09:06 +0200
commit3a2fbd6fae6ea48b01b904f67245db2e6f4f8228 (patch)
tree158ea0f8682e7863f5eeec959780d73b8a37425e /platform/javascript/export/export_plugin.cpp
parent22a40365c05a0fce917110b87c5d46afdcd1b44a (diff)
downloadredot-engine-3a2fbd6fae6ea48b01b904f67245db2e6f4f8228.tar.gz
[HTML5] Add GDNative+Threads build.
Diffstat (limited to 'platform/javascript/export/export_plugin.cpp')
-rw-r--r--platform/javascript/export/export_plugin.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp
index 128834c90f..901580c140 100644
--- a/platform/javascript/export/export_plugin.cpp
+++ b/platform/javascript/export/export_plugin.cpp
@@ -215,7 +215,7 @@ Error EditorExportPlatformJavaScript::_build_pwa(const Ref<EditorExportPreset> &
cache_files.push_back(name + ".icon.png");
cache_files.push_back(name + ".apple-touch-icon.png");
}
- if (mode == EXPORT_MODE_THREADS) {
+ if (mode & EXPORT_MODE_THREADS) {
cache_files.push_back(name + ".worker.js");
cache_files.push_back(name + ".audio.worklet.js");
}
@@ -225,7 +225,7 @@ Error EditorExportPlatformJavaScript::_build_pwa(const Ref<EditorExportPreset> &
Array opt_cache_files;
opt_cache_files.push_back(name + ".wasm");
opt_cache_files.push_back(name + ".pck");
- if (mode == EXPORT_MODE_GDNATIVE) {
+ if (mode & EXPORT_MODE_GDNATIVE) {
opt_cache_files.push_back(name + ".side.wasm");
for (int i = 0; i < p_shared_objects.size(); i++) {
opt_cache_files.push_back(p_shared_objects[i].path.get_file());
@@ -317,9 +317,10 @@ void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportP
}
}
ExportMode mode = (ExportMode)(int)p_preset->get("variant/export_type");
- if (mode == EXPORT_MODE_THREADS) {
+ if (mode & EXPORT_MODE_THREADS) {
r_features->push_back("threads");
- } else if (mode == EXPORT_MODE_GDNATIVE) {
+ }
+ if (mode & EXPORT_MODE_GDNATIVE) {
r_features->push_back("wasm32");
}
}