diff options
author | Leon Krause <lk@leonkrause.com> | 2018-10-29 21:15:15 +0100 |
---|---|---|
committer | Leon Krause <lk@leonkrause.com> | 2018-10-29 21:41:59 +0100 |
commit | 5c2c47a17449a69c24ab92804dbb7ca09fd920c9 (patch) | |
tree | 5d2060808f1c6bfe0e6dc6ca59a3625883136de8 /platform/javascript | |
parent | 0a80ceaf02b258c548e500297079a350d8567023 (diff) |
Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()
Avoids linker warnings and errors about undefined references.
Diffstat (limited to 'platform/javascript')
-rw-r--r-- | platform/javascript/os_javascript.cpp | 18 | ||||
-rw-r--r-- | platform/javascript/os_javascript.h | 4 |
2 files changed, 22 insertions, 0 deletions
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 7c7aeac980..9250ca4903 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -862,6 +862,24 @@ void OS_JavaScript::finalize() { // Miscellaneous +Error OS_JavaScript::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) { + + ERR_EXPLAIN("OS::execute() is not available on the HTML5 platform"); + ERR_FAIL_V(ERR_UNAVAILABLE); +} + +Error OS_JavaScript::kill(const ProcessID &p_pid) { + + ERR_EXPLAIN("OS::kill() is not available on the HTML5 platform"); + ERR_FAIL_V(ERR_UNAVAILABLE); +} + +int OS_JavaScript::get_process_id() const { + + ERR_EXPLAIN("OS::get_process_id() is not available on the HTML5 platform"); + ERR_FAIL_V(0); +} + extern "C" EMSCRIPTEN_KEEPALIVE void send_notification(int p_notification) { if (p_notification == MainLoop::NOTIFICATION_WM_MOUSE_ENTER || p_notification == MainLoop::NOTIFICATION_WM_MOUSE_EXIT) { diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 84075898ac..79dac5940f 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -133,6 +133,10 @@ public: void run_async(); bool main_loop_iterate(); + virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false); + virtual Error kill(const ProcessID &p_pid); + virtual int get_process_id() const; + virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); virtual void set_window_title(const String &p_title); virtual void set_icon(const Ref<Image> &p_icon); |