[HTML5] Implement get_processor_count.

This commit is contained in:
Fabio Alessandrelli 2021-02-15 15:48:06 +01:00
parent 1446cfd13d
commit 26ec6ca576
4 changed files with 11 additions and 0 deletions

View file

@ -282,6 +282,11 @@ const GodotOS = {
godot_js_os_shell_open: function (p_uri) {
window.open(GodotRuntime.parseString(p_uri), '_blank');
},
godot_js_os_hw_concurrency_get__sig: 'i',
godot_js_os_hw_concurrency_get: function () {
return navigator.hardwareConcurrency || 1;
},
};
autoAddDeps(GodotOS, '$GodotOS');