1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

[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.
This commit is contained in:
Fabio Alessandrelli
2020-12-03 17:15:14 +01:00
parent 1e7bd3d08b
commit dd9503dc19
4 changed files with 22 additions and 3 deletions

View File

@@ -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) {