summaryrefslogtreecommitdiffstats
path: root/platform/web
diff options
context:
space:
mode:
Diffstat (limited to 'platform/web')
-rw-r--r--platform/web/detect.py4
-rw-r--r--platform/web/os_web.cpp4
-rw-r--r--platform/web/os_web.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/platform/web/detect.py b/platform/web/detect.py
index bbe1634dfa..7d9b1de6b7 100644
--- a/platform/web/detect.py
+++ b/platform/web/detect.py
@@ -15,7 +15,7 @@ from SCons.Util import WhereIs
from typing import TYPE_CHECKING
if TYPE_CHECKING:
- from SCons import Environment
+ from SCons.Script.SConscript import SConsEnvironment
def get_name():
@@ -81,7 +81,7 @@ def get_flags():
]
-def configure(env: "Environment"):
+def configure(env: "SConsEnvironment"):
# Validate arch.
supported_arches = ["wasm32"]
if env["arch"] not in supported_arches:
diff --git a/platform/web/os_web.cpp b/platform/web/os_web.cpp
index cbdcbf565d..45671ca491 100644
--- a/platform/web/os_web.cpp
+++ b/platform/web/os_web.cpp
@@ -150,7 +150,7 @@ String OS_Web::get_executable_path() const {
return OS::get_executable_path();
}
-Error OS_Web::shell_open(String p_uri) {
+Error OS_Web::shell_open(const String &p_uri) {
// Open URI in a new tab, browser will deal with it by protocol.
godot_js_os_shell_open(p_uri.utf8().get_data());
return OK;
@@ -239,7 +239,7 @@ bool OS_Web::is_userfs_persistent() const {
return idb_available;
}
-Error OS_Web::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
+Error OS_Web::open_dynamic_library(const String &p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
String path = p_path.get_file();
p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW);
ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror()));
diff --git a/platform/web/os_web.h b/platform/web/os_web.h
index 5a48997c17..e578c93925 100644
--- a/platform/web/os_web.h
+++ b/platform/web/os_web.h
@@ -89,7 +89,7 @@ public:
int get_default_thread_pool_size() const override { return 1; }
String get_executable_path() const override;
- Error shell_open(String p_uri) override;
+ Error shell_open(const String &p_uri) override;
String get_name() const override;
// Override default OS implementation which would block the main thread with delay_usec.
@@ -107,7 +107,7 @@ public:
void alert(const String &p_alert, const String &p_title = "ALERT!") override;
- Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override;
+ Error open_dynamic_library(const String &p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override;
void resume_audio();