diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-17 13:31:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-17 13:31:21 +0100 |
commit | fa24c99a5c0454586313958a04375ab63ac7d544 (patch) | |
tree | 003c879bbe16340ea2fe308268596eea0e70fdd5 /platform/javascript/js | |
parent | 99fc96e7b3d8540825e46ed16b97585c52c34f5d (diff) | |
parent | 26ec6ca576ec91fe3ae52bd647d7d1778ad4716c (diff) |
Merge pull request #46119 from Faless/js/4.x_processor_count
[HTML5] Implement OS.get_processor_count(), 4.0 fixes
Diffstat (limited to 'platform/javascript/js')
-rw-r--r-- | platform/javascript/js/libs/library_godot_os.js | 5 |
1 files changed, 5 insertions, 0 deletions
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'); |