From 26ec6ca576ec91fe3ae52bd647d7d1778ad4716c Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 15 Feb 2021 15:48:06 +0100 Subject: [HTML5] Implement get_processor_count. --- platform/javascript/js/libs/library_godot_os.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'platform/javascript/js') diff --git a/platform/javascript/js/libs/library_godot_os.js b/platform/javascript/js/libs/library_godot_os.js index 9fde4a84e1..3ffcd655b7 100644 --- a/platform/javascript/js/libs/library_godot_os.js +++ b/platform/javascript/js/libs/library_godot_os.js @@ -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'); -- cgit v1.2.3