Skip to content

Commit

Permalink
Merge pull request #93556 from Faless/web/fix_threads_features
Browse files Browse the repository at this point in the history
[Web] Add "threads"/"nothreads" feature tags to export presets
  • Loading branch information
akien-mga committed Jun 26, 2024
2 parents 1f94de2 + f59c1f0 commit 2161f98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions platform/web/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,22 @@ void EditorExportPlatformWeb::get_preset_features(const Ref<EditorExportPreset>
if (p_preset->get("vram_texture_compression/for_desktop")) {
r_features->push_back("s3tc");
}

if (p_preset->get("vram_texture_compression/for_mobile")) {
r_features->push_back("etc2");
}
if (p_preset->get("variant/thread_support").operator bool()) {
r_features->push_back("threads");
} else {
r_features->push_back("nothreads");
}
r_features->push_back("wasm32");
}

void EditorExportPlatformWeb::get_export_options(List<ExportOption> *r_options) const {
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));

r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "variant/extensions_support"), false)); // Export type.
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "variant/extensions_support"), false)); // GDExtension support.
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "variant/thread_support"), false)); // Thread support (i.e. run with or without COEP/COOP headers).
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "vram_texture_compression/for_desktop"), true)); // S3TC
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "vram_texture_compression/for_mobile"), false)); // ETC or ETC2, depending on renderer
Expand Down

0 comments on commit 2161f98

Please sign in to comment.