mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +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:
parent
1e7bd3d08b
commit
dd9503dc19
4 changed files with 22 additions and 3 deletions
|
@ -128,12 +128,24 @@ int OS_JavaScript::get_process_id() const {
|
|||
}
|
||||
|
||||
bool OS_JavaScript::_check_internal_feature_support(const String &p_feature) {
|
||||
if (p_feature == "HTML5" || p_feature == "web")
|
||||
if (p_feature == "HTML5" || p_feature == "web") {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef JAVASCRIPT_EVAL_ENABLED
|
||||
if (p_feature == "JavaScript")
|
||||
if (p_feature == "JavaScript") {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#ifndef NO_THREADS
|
||||
if (p_feature == "threads") {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#if WASM_GDNATIVE
|
||||
if (p_feature == "wasm32") {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue