diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-06-14 15:04:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 15:04:30 +0200 |
commit | 64c2df8a47d3aa479570e08fe9611bb14012dd97 (patch) | |
tree | 09fa004be6195dc2c180a8e723c9d1648e1f1f76 /platform/javascript/export/export_plugin.cpp | |
parent | c704b94faa111ead4040832175cca861ac509565 (diff) | |
parent | 3a2fbd6fae6ea48b01b904f67245db2e6f4f8228 (diff) | |
download | redot-engine-64c2df8a47d3aa479570e08fe9611bb14012dd97.tar.gz |
Merge pull request #62028 from Faless/js/4.x_threads_gdnative_export
Diffstat (limited to 'platform/javascript/export/export_plugin.cpp')
-rw-r--r-- | platform/javascript/export/export_plugin.cpp | 9 |
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"); } } |