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

[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');